我想添加此
<?php wp_nav_menu( array( 'theme_location' => 'top-navigation-menu' ) ); ?>
<div class="right"></div>
以下代码。整个HTML代码目前由<?php echo ?>
这就是我使用的,
<?php
echo '<div class="top-box-2">
<div class="container">
<div class="left">
Search bar
</div>
<div class="right"><?php wp_nav_menu( array( 'theme_location' => 'top-navigation-menu' ) ); ?></div>
</div>
</div>'; ?>
但是当我将php代码放在<div></div>
答案 0 :(得分:2)
<?php
echo '<div class="top-box-2">
<div class="container">
<div class="left">
Search bar
</div>
<div class="right">' . wp_nav_menu( array( 'theme_location' => 'top-navigation-menu' ) ) . '</div>
</div>
</div>'; ?>
在PHP文档中查看String Operators。