1.wordpressèªå®ä¹èåè°ç¨
wordpressèªå®ä¹èåè°ç¨
ä½ å¥½ï¼æè§å¾ä½ åèçå¯è½æ¯HotNewsä¹ç±»ç主é¢ï¼å ä¸ºä½ å®ä¹èåç代ç è¿äºç®åï¼æ²¡æç»theme_locationèµå¼ï¼æ以ï¼ç¬¬äºç§æ¹æ³æ³¨å®å¤±è´¥çï¼æç建议ï¼
å®ä¹ä¸ä¸ªèåï¼
//menu walker extendfunction cwpmenu(){
if(has_nav_menu( 'header-menu' ))
{
wp_nav_menu(array(
'theme_location'=>'header-menu',导航s导化妆品溯源码撕毁
'menu_id'=>false,
'container'=>'ul',
'menu_class'=>'nav',
'fallback_cb'=> 'wp_bootstrap_navwalker::fallback',//è¿æ¯ä¸ä¸ªGithubä¸çå¼æºç±»ï¼å¿äºä½è å«å¥äº
'walker'=> new wp_bootstrap_navwalker()
)
);
}else{
echo'<ul class="nav">';wp_list_pages('title_li=');echo'</ul>';
}
}
å¨header.phpä¸è°ç¨ï¼
<?php if (function_exists('cwpmenu')){cwpmenu(); }else{ ?>
Setup your main menu here:Wordpress pannel > <strong>Apperance > Menus</strong>
<?php } ?>
å¦æä¸æç½çï¼å»Wordpressç¹orgæ¥çææ¡£æç¾åº¦ä¸ä¸å ï¼
è¿ä¸æç½çè¯ï¼ååé®ï¼
ç¥æå¿«ï¼