Here is another guest post by Brian explaining how to tweak the home page display.
Many people new to blogging and WordPress, and some intermediates, are a little confused about what actually is their home page.
Let us start by defining the home page in the greater scheme of things. The home page is the first page a browser opens when directed at a website or when the website’s "home" button is pressed.
For a newly installed WordPress installation that hasn’t been tweaked the home page is a page showing your last 10 posts (posts..... not pages), so when you click the ‘Home’ tab on the Grace themes in the top left, this is where you end up.
As can be expected of WordPress, this can be altered, and very simply as well. You’ll need to open up your admin panel and under ‘Settings’ go to ‘Reading’.
You are given the choice to have your home page open as a typical blog, showing posts, or onto a single page, like a traditional website.
If you have chosen a page, you must now tell WordPress which one you wish to display. Note – the drop down list will only show published pages.
Finally, WordPress needs to know how to access your posts. So again you are presented with a choice of pages to display your blog on.
One problem people find...and can’t deal with.... after they select a page to be their home page is that the tab for that page appears at the top left of the blog on the page menu even though the tab ’Home’ is there. Like a dual link! For this fix head over into the theme editor and open the header.php
The following code controls the ‘page menu’ bar at the top of the blog. With some tweaking this bar can display anything you want.
<div id="menu"> <ul> <li><a href="<?php echo get_option('home'); ?>/" >Home</a></li> <?php wp_list_pages('sort_column=menu_order&include=2,16&title_li='); ?> </ul> </div>
Some basic changes were mentioned in this previous tutorial. However the example I gave was a very basic HTML example. For a more in-depth look at what can be done with the page menu look at the WordPress page on Page Template Tags.
Here is the basic way to avoid the extra home page tab.
Find the page id number (either hover over it in the ‘admin panel/edit pages’ list and look at the URL, or install the plugin Restore ID), then in header.php turn this –
<?php wp_list_pages('sort_column=menu_order&title_li='); ?>
Into this –
<?php wp_list_pages('sort_column=menu_order&exclude=2&title_li='); ?>
…using the correct page ID.
Some people don’t like the word ‘Home’ to be displayed in that tab. Well change it then! In the code above change the word ‘Home’ .
- Ask the WordPress Guru, Q&A #1
- Do it Yourself: Optimize your WordPress Page Headings
- 5 cool WordPress plugins you never heard about
Posted in: WordPress
TAGS:change home button wordpress, change wordpress page tabs, get_option home page, grace theme, recent post, tweak comment posts wordpress, tweak wordpress homepage, tweaking wordpress, wordpress change home tab, wordpress change page, wordpress home page, wordpress home pages, wordpress homepage example, wordpress homepage excerpts plugin, wordpress page home page, wordpress tweaks