Re:Just In! 3.4 by John Crenshaw
Hi John
We just spoke. I have down loaded your new template (I am having trouble opening the additional pages on your new template and need advice.
Thank you, Harvey
Re:Just In! 3.4 by John Crenshaw
Hi John
We just spoke. I have down loaded your new template (I am having trouble opening the additional pages on your new template and need advice.
Thank you, Harvey
Hi Harvey,
This isn't totally clear. If I remember correctly, you said you want to add navigation tabs to the theme, right?
If so, here's how:
1. Open the header.php file in your theme directory.
2. Starting around line 32 you'll see this:
<!--Main navigation menu-->
<ul>
<li><a rel="nofollow">href="<?php bloginfo('url'); ?>" title="Home">Home</a></li>
<!-- Sample navigation menu
<li><a rel="nofollow">href="<?php bloginfo('url'); ?>/blog/" title="Blog">Blog</a></li>
<li><a rel="nofollow">href="<?php bloginfo('url'); ?>/?page_id=2" title="About <?php bloginfo('name'); ?>">About</a></li>
<li><a rel="nofollow">href="<?php bloginfo('url'); ?>/archives/" title="Visit the archives">Archives</a></li>
<li><a>/feed/" title="RSS Feed">Feed</a></li>
<li><a>/sitemap/" title="Sitemap">Sitemap</a></li>
-->
</ul>
In the above code, the bottom 5 lines are sample navigation tabs that I've commented out. You can use those as examples, but basically...
If you want to add a tab to a page with page slug, "new-page," you'd need to add the following code:
<li><a <?php if(is_page('new-post')) echo 'class="current" ';?>href="<?php bloginfo('url');?>/new-page/" title="Visit my new page">Tab Text</a></li>
Likewise, if you want to add a tab to a post with slug, "new-post," you'd need to add the following code:
<li><a <?php if(is_single('new-post')) echo 'class="current" ';?>href="<?php bloginfo('url');?>/new-post/" title="Read the new post">Tab Text</a></li>
Notice the use of the is_page() function in the first example and the is_single() function in the second.
Replying to @John Crenshaw's post:
Thank you so much.
You must log in to post.