• Hi,

    I want to re-arrange the order of the main menu. I am able to change the order of them, except for one, the first one that says home. I want this to say “Blog” and it needs to appear as the last item in the menu.

    Also I want to link all of the menu items to external links, except for the blog one, that can stay. Any ideas on how I can easily acheive this?

    Any help is much appreciated!

    Oh, my url is here to show what I mean, its the top links under the branding bar: http://www.clearlycreative.net/blog/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Could you post part of the source that is generating that menu on the top?

    This is a bit of code that I use to do what you just said.

    <div class="menu">
    <ul>
    <?PHP
    global $wpdb;
    $buff = $wpdb->get_results("SELECT * FROM wp_posts WHERE post_parent='0' AND post_type='page' AND post_status = 'publish' ORDER BY menu_order ASC");
    foreach ($buff as $line) {
    	if(!get_post_meta($line->ID, 'nav_hide', true)){
    		$nav_name = get_post_meta($line->ID, 'nav_name', true);
    		if ( !$nav_name ) $nav_name = $line->post_title; else $nav_name = $nav_name;
    		?>
    		<li><a class="menu1one" href="<?=get_permalink($line->ID); ?>"><?=$nav_name ?></a></li>
            <?PHP
    	}
    }
    ?>
    </ul>
    </div>

    So basically how this works is it uses the sort order to order the links in the navigation bar and you can use the custom value nav_hide set to true in a custom filed of pages you want hidden from the navigation bar.

    I also added a custom field called nav_name that allows the user to change the name of the link without editing the name of the page.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘re-arranging menu etc’ is closed to new replies.