View Full Version : Menu Reorder
blogods.info
February 26th, 2006, 01:16
How to re-order menu so that "blog" is the last one to show?
ronincyberpunk
February 26th, 2006, 04:15
You need to modify your header.php and find the section that looks like this:
<ul class="menu">
<li class="<?php if (((is_home()) && !(is_paged())) or (is_archive()) or (is_single()) or (is_paged()) or (is_search())) { ?>current_page_item<?php } else { ?>page_item<?php } ?>"><a href="<?php echo get_settings('home'); ?>">Blog</a></li>
<?php wp_list_pages('sort_column=menu_order&depth=1&title_li='); ?>
<?php wp_register('<li class="admintab">','</li>'); ?>
If you just want it to show up after the other pages, you change it to look like this:
<ul class="menu">
<?php wp_list_pages('sort_column=menu_order&depth=1&title_li='); ?>
<li class="<?php if (((is_home()) && !(is_paged())) or (is_archive()) or (is_single()) or (is_paged()) or (is_search())) { ?>current_page_item<?php } else { ?>page_item<?php } ?>"><a href="<?php echo get_settings('home'); ?>">Blog</a></li>
<?php wp_register('<li class="admintab">','</li>'); ?>
Or if you want it to be on the far right, and replace the admin tab which currently sits there, just use this:
<ul class="menu">
<?php wp_list_pages('sort_column=menu_order&depth=1&title_li='); ?>
<li class="<?php if (((is_home()) && !(is_paged())) or (is_archive()) or (is_single()) or (is_paged()) or (is_search())) { ?>current_page_item<?php } else { ?>page_item<?php } ?>"><a href="<?php echo get_settings('home'); ?>" class="admintab">Blog</a></li>
That should work for you, let us know if it doesn't.
blogods.info
February 26th, 2006, 04:25
Thanks, it worked! But then how can I make another page, say "about", to be my blog's home page. By default it's "blog" as you know.
ronincyberpunk
February 26th, 2006, 04:33
I don't think I understand what you're asking. You want another button that says "About" be your homepage?
blogods.info
February 26th, 2006, 04:36
Currently, the page called "blog" is the one that shows first when someone visits the site. How to make another page to act in this way?
blogods.info
February 26th, 2006, 08:43
So, guys, the question is still open.
ajw
March 1st, 2006, 07:20
Hi, i think you and i have the same question. Have you soulved it? If not maybe you will find this thread helpfull. http://getk2.com/forum/showthread.php?t=240
ajw
nolawi
March 4th, 2006, 02:49
You need to modify your header.php and find the section that looks like this:
<ul class="menu">
<li class="<?php if (((is_home()) && !(is_paged())) or (is_archive()) or (is_single()) or (is_paged()) or (is_search())) { ?>current_page_item<?php } else { ?>page_item<?php } ?>"><a href="<?php echo get_settings('home'); ?>">Blog</a></li>
<?php wp_list_pages('sort_column=menu_order&depth=1&title_li='); ?>
<?php wp_register('<li class="admintab">','</li>'); ?>
If you just want it to show up after the other pages, you change it to look like this:
<ul class="menu">
<?php wp_list_pages('sort_column=menu_order&depth=1&title_li='); ?>
<li class="<?php if (((is_home()) && !(is_paged())) or (is_archive()) or (is_single()) or (is_paged()) or (is_search())) { ?>current_page_item<?php } else { ?>page_item<?php } ?>"><a href="<?php echo get_settings('home'); ?>">Blog</a></li>
<?php wp_register('<li class="admintab">','</li>'); ?>
Or if you want it to be on the far right, and replace the admin tab which currently sits there, just use this:
<ul class="menu">
<?php wp_list_pages('sort_column=menu_order&depth=1&title_li='); ?>
<li class="<?php if (((is_home()) && !(is_paged())) or (is_archive()) or (is_single()) or (is_paged()) or (is_search())) { ?>current_page_item<?php } else { ?>page_item<?php } ?>"><a href="<?php echo get_settings('home'); ?>" class="admintab">Blog</a></li>
That should work for you, let us know if it doesn't.
kool info.... thanks
nolawi
March 5th, 2006, 05:42
this works perfectly but what if i want the blog to be the second in the menu. not the last????
see here (http://bernos.org/blog/) i want the blog to be after home...
nolawi
March 6th, 2006, 03:24
Still need to know how to do this ?^^^^
THuRStoN
March 6th, 2006, 05:31
You should check the page order property in every page, using that you could have your preferred tab order. That's what I did.
Hope that helps!
nolawi
March 6th, 2006, 05:51
You should check the page order property in every page, using that you could have your preferred tab order. That's what I did.
Hope that helps!
that worked fine except that the page order only works for written pages and not for the blog... to move the blog i would have to change the header php file...
like what is instructed above...
except in my cast i want the blog in the middle of the other pages
vBulletin v3.6.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.