RT Theme 18 如何添加友情链接的菜单

Yoth Blog

RT Theme 18 如何添加友情链接的菜单

Upcoming Sessions
Table of Contents
    Add a header to begin generating the table of contents

    1,首先打开footer.php

    2, 在前面插入:
    				
    					                        <!-- friendship links nav -->
    					<?php if ( has_nav_menu( 'friendship-links' ) ): // check if user created a custom menu and assinged to the rt-theme's location ?>
                        
    					    
    				    <?php else:?>
    					    <?php  
    						   //call the friendship links menu
    						    $footermenuVars = array(
    						       'menu'            => 'Friendship Links', 
    							   'depth'		 	 => 1,
    							   'menu_id'         => 'friendship-links',
    							   'menu_class'      => 'footer_links', 
    							   'echo'            => false,
    							   'container'       => '', 
    							   'container_class' => '', 
    							   'container_id'    => '',
    							   'theme_location'  => '' 
    						    );
    						    $footer_menu=wp_nav_menu($footermenuVars);
    						    echo $footer_menu;
    					    ?>
                        <?php endif;?>
    			  	<!-- / end ul .friendship links -->
                    
    				
    			
    这个代码不够完善,我也是自己摸索的,如果有大神能够修改会非常感谢。 切记,外观-菜单下面需要有“Friendship Links”这个名字的菜单。
    Facebook
    Twitter
    LinkedIn

    Maybe You Like

    WordPress

    Astra

    RT Theme

    Scroll to Top