我为我的wordpress主题创建了自定义引导navwalker类所有东西都正常工作我在下面的代码中function start_el(){}
当我把<h2>Hellow World!</h2>
在内部$item_output
dropdwon菜单显示Hellow World!
四列四次
但当我想把the_title()
wordpress函数$item_output
像这样<h2>\'.the_title().\'</h2>
给我看看Hello World!
将标题张贴在主菜单项上方,而不是下拉菜单中
我怎样才能解决这个问题?
if (!empty($item->divideto_4)) {
$col = 3;
$divide_to = 12 / $col; //4
for ($i=0; $i<$divide_to; $i++) {
$item_output .= \'<div class="col-sm-\'.$col.\'"><h2>Hellow World!</h2></div>\';
}
}