Ready to get started?Download WordPress


Crafty Cart
Crafty Cart - Having trouble converting menu to wp_nav_menu (3 posts)

  1. JasonOLeary
    Posted 2 years ago #

    I am having the same problem as the guy in this post, namely that I cannot change the wp_list_pages to wp_nav_menu.

    I may be thick but I have tried the solution offered and cannot get the menu to display correctly.

    I can get the wp_nav_menu to display, but it is always vertical not horizontal.

    Any help would be much appreciated I can link to the site or post the code if anyone is willing/able to assist.

    Many thanks



  2. JasonOLeary
    Posted 2 years ago #

    Hi decided to post the code in case anyone pops in and can make sense.

    original navigation.php is:

    <ul id="nav">
    	<li class="nav-start"> </li>
    	<?php wp_list_pages('title_li=&depth=2'); ?>
    	<li class="page_item last-page-item rss"><a href="<?php bloginfo('rss2_url'); ?>" title="News Feed">RSS</a></li>
    	<li class="nav-end"> </li>

    style.css is:

    [Code moderated as per the Forum Rules. The maximum number of lines of code that you can post in these forums is ten lines. Please use the pastebin]

    I have added add_theme_support( 'nav-menus' );

    when I change navigation.php to:

    <ul id="nav">
    	<li class="nav-start"> </li>
    	<?php wp_nav_menu( array( 'sort_column' => 'menu_order', 'container_class' => 'menu-header' ) ); ?>
    		<li class="nav-end"> </li>

    If I just post <?php wp_nav_menu( array( 'sort_column' => 'menu_order', 'container_class' => 'menu-header' ) ); ?> then the menu moves to the left as a vertical list

    Any help much appreciated!!

    you can see the result here

  3. JasonOLeary
    Posted 2 years ago #

    Sorry for style.css pastbin is
    <iframe src="http://pastebin.com/embed_iframe.php?i=h6jy1Ec5" style="border:none;width:100%"></iframe>

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic