Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/design-patterns/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在Wordpress中将下拉菜单放在标题下方?_Wordpress_Drop Down Menu - Fatal编程技术网

如何在Wordpress中将下拉菜单放在标题下方?

如何在Wordpress中将下拉菜单放在标题下方?,wordpress,drop-down-menu,Wordpress,Drop Down Menu,我通过这个网站创建了一个下拉菜单。最后一个代码zip文件有一个.html文件、.css文件和一个.js文件。如何将其放在标题下?您应该打开主题的header.php文件,然后在主题的[do_action('genesis_meta');]e[wp_head()]之间添加包含css(例如style.css)和js文件(例如script.js)的标记: <link rel="stylesheet" type="text/css" href="<?php echo get_template

我通过这个网站创建了一个下拉菜单。最后一个代码zip文件有一个.html文件、.css文件和一个.js文件。如何将其放在标题下?

您应该打开主题的header.php文件,然后在主题的[do_action('genesis_meta');]e[wp_head()]之间添加包含css(例如style.css)和js文件(例如script.js)的标记:

<link rel="stylesheet" type="text/css" href="<?php echo get_template_directory_uri(); ?>/style.css">
<script type="text/javascript" src="<?php echo get_template_directory_uri(); ?>/script.js">

如果要将此菜单用作可编辑的wordpress菜单,应使用

<?php wp_nav_menu( $args ); ?>

在html代码中。

我是否应该复制主题文件夹(wp content\themes\genesis)中的.css和.js文件。我使用的是Genesis.Ok,但是使用wp函数get\u template\u directory\u uri()打印主题文件夹的路径。我已经编辑了我的帖子。显示我的帖子评论,我希望是正确的。保存header.php的备份副本以便还原。我不懂编码:(使用红色答案)。