Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I created a page so that it would appear in my navigation menu. This page would however be my posts page (i.e. all posts would go here) and would also be my front page.

I am unable to find anything other than editing the 'Home' in the theme file (none of the themes I tried had the 'Home' editable).

In other words, I'm looking for something that would redirect all of my posts as a stream into my homepage that also has a link in the navigation menu.

I tried looking at a lot of places for help in this, however I couldn't find anything useful.

Thanks!

share|improve this question
    
What kind of navigation menu do you mean? One that you manage through the admin menu screen or one that creates itself based on pages? –  helenhousandi Sep 11 '11 at 17:21
    
The one that creates itself based on pages. –  Ganesh Sep 11 '11 at 17:24
add comment

1 Answer

up vote 0 down vote accepted

You should be able to do this with just having the front page show blog posts like it does by default. No need to make empty pages and redirect and all that. In the theme file that contains your navigation (quite likely header.php), look for something that looks like this:

<ul>
<?php wp_list_pages( /* maybe some stuff here */ ); ?>
</ul>

You can add a list item before wp_list_pages() that points to home, e.g.

<li<?php if ( is_home() ) echo ' class="current_page_item"'; ?>><a href="<?php bloginfo('url'); ?>">Home</a></li>

There's also a conditional in there that will add the current_page_item class if you're on the home page with blog posts.

share|improve this answer
    
Thanks! Sounds wonderful! Just another query though. The code that you were talking about looks like this. <?php wp_list_pages('title_li=<h2>Pages</h2>' ); ?> How do I incorporate a list item when it's not in an <ul> tag of its own? –  Ganesh Sep 11 '11 at 18:02
    
wp_list_pages() does not output the <ul>, so it must be in there somewhere. Check your final HTML output to see if it's there. Can you link to the site? –  helenhousandi Sep 11 '11 at 18:55
    
It's still under development, I've somehow managed the end result. Thanks so much! –  Ganesh Sep 11 '11 at 19:07
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.