为什么我的身体在我移动菜单后立即打开


Why is my body on right after I moved my menu?

我正在尝试基于WordPress制作自己的网站,我发现了非常好的主题(DEVPRESS的FANWOOD LIGHT),但我需要将"导航"或"菜单"移动到标题下方。当我这样做时,我的身体只是向右移动,我不知道是什么。

有关于免费虚拟主机的网页:http://stbrezenecka.wz.cz/(捷克语)

有我的标题.php:

<?php
/**
 * The Header for our theme.
 *
 * Displays all of the <head> section and everything up till <div id="main">
 *
 * @package Fanwood Light
 * @since Fanwood Light 1.0
 */
?><!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<meta name="viewport" content="width=device-width" />
<title><?php wp_title( '|', true, 'right' ); ?></title>
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<!--[if lt IE 9]>
<script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script>
<![endif]-->
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
	<?php do_action( 'before' ); ?>
	<header id="masthead" class="site-header" role="banner">
		<hgroup>
		<?php
			$header_image = get_header_image();
			if ( ! empty( $header_image ) ) { ?>
				<a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">
					<img src="<?php echo esc_url( $header_image ); ?>" class="header-image" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="" />
				</a>
			<?php } ?>
			<div class="header">
			<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
			<h2 class="site-description"><?php bloginfo( 'description' ); ?></h2>
			</div>
		</hgroup>
	</header><!-- #masthead .site-header -->
	<div id="main-navigation">
		<nav id="site-navigation" class="navigation-main" role="navigation">
			<h1 class="menu-toggle"><?php _e( 'Menu', 'fanwood_light' ); ?></h1>
			<div class="assistive-text skip-link"><a href="#content" title="<?php esc_attr_e( 'Skip to content', 'fanwood_light' ); ?>"><?php _e( 'Skip to content', 'fanwood_light' ); ?></a></div>
			<?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
		</nav><!-- .site-navigation .main-navigation -->
	</div>
<div id="page" class="hfeed site">
<div id="main" class="site-main">

Threre是截图:https://i.stack.imgur.com/CtAT8.png

你有<?php do_action( 'before' ); ?>创建一个<div>,所以在</header>之后添加</div>

是的,我做到了!我所做的只是从标题中删除导航.php并移动到索引中.php它起作用了。

相关文章: