small php help for wordpress tabs

Hi im extremely new to php but i got a problem that may be super simple for someone to solve. I want to make more tabs to my site and it took me a really long time to get this far but i finally found the tab part of the site and tried to make another tab unfortunately it doesn’t work like its supposed to. i added the “word up” tab but i just basically copy and pasted the home tab and don’t know what parameters to change to make word up work. heres the code for those two tabs the second being the lame word up tab that i pasted (the actual page ID for the “word up!” tab is 20: please let me know what all the crazy nonsense is that im doing wrong…

			<li<?php echo (!isset($_GET['page_id']) || intval($_GET['page_id']) == 0 ? ' class="current_page_item"': '')?>><a href="<?php echo get_option('home'); ?>/">Home</a></li>

<li<?php echo (!isset($_GET['page_id']) || intval($_GET['page_id']) == 20 ? ' class="current_page_item"': '')?>>Word Up!

sorry my site is www.atomicminddump.com if you want to see

So, what is the problem with tab? On your site it seem to be working fine now.

HI im sorry im stupid and forgot i posted this last night, i actually just posted another topic about this nav bar but i got a little farther with what i was doing wrong but i still got a question. Heres the update at where im at:

[Admin: please post your update in this thread]

again sorry for making double posts

Update!

I finally figured out how the tabs work on the site, heres the code as it should have been

			<li<?php echo (!isset($_GET['page_id']) || intval($_GET['page_id']) == 0 ? ' class="current_page_item"': '')?>><a href="<?php echo get_option('home'); ?>/">Home</a></li>
<?php wp_list_pages('title_li='); ?>

The first bit deals with home tab, the second line makes more tabs based on the title of the pages in wordpress that you add, each time you add a new page to wordpress it takes the title of that page and makes a tab for it. My problem is that i want to add tabs that function like they’re supposed to but that link to whatever link i want instead of pages like if i wanted to make one link to http://www.atomicminddump.com/?cat=3

Thats basically it, if theres anything im missing or left out please let me know, thanks a lot for your help!

Sponsor our Newsletter | Privacy Policy | Terms of Service