這是HTML代碼,而不包括UL李標籤中的PHP:引導導航欄類工作不正常
<html>
<body>
<div class="container-fluid">
<div class="row">
<div class="text-center" style="margin-top: 15px;">
<span><h2><?php bloginfo('name'); ?></h2></span>
<p><h6><?php bloginfo('description'); ?></h6></p>
</div>
<nav class="navbar navbar-default">
<ul class="nav navbar-nav">
<li><a href="#">Home</a></li>
<li><a href="#">Lifestyle</a></li>
<li><a href="#">Adventure</a></li>
<li><a href="#">Fashion<span class="caret"></span></a></li>
<li><a href="#">Travel</a></li>
<li><a href="#">Story</a></li>
</ul>
</nav>
</div>
</body>
</html>
這是PHP的HTML代碼中包含了UL李標籤中:
<html>
<body>
<div class="container-fluid">
<div class="row">
<div class="text-center" style="margin-top: 15px;">
<span><h2><?php bloginfo('name'); ?></h2></span>
<p><h6><?php bloginfo('description'); ?></h6></p>
</div>
<nav class="navbar navbar-default stroke">
<ul class="nav navbar-nav">
<?php
$args = array(
'theme_location' => 'primary',
);
?>
<li><?php wp_nav_menu($args);?></li>
</ul>
</nav>
</div>
</body>
</html>
這裏的導航欄像這樣工作的圖像: Working code image
下面是不加載css類的導航欄圖像: Image which is not loading css and links are different b'cause theme development function is called