Jump to content

Tabs at the top of my wordpress site


DeLiRiOuS

Recommended Posts

Hi i'm comletely new to PHP and have what may be an easy problem to solve below is the code that makes the tabs at the top of the page. The first bit deals with the 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.

 

            <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='); ?>

 

My problem is that i want to add tabs that function like they're supposed to (proper mouse over and they turn black when the tab matches the page your on)  but that i can make link to  whatever link i want instead of just pages created in wordpress like if i wanted to make one tab that  linked to http://www.atomicminddump.com/?cat=3 and another that linked to www.yahoo.com and so on, is there any way to modify the existing code to do that?

 

Thanks a lot any help would be greatly appreciated!

 

 

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

Link to comment
Share on other sites

I think you can just add you get_links("title=") function to that and it will do the same as the get_pages() function. that way you can add links too and the tabs will open. However, if these are jQuery tabs with a remote url, it will break your tabs if you put in an absolute remote url as the href attr. (A local url will be called via AJAX, and will .load() into the tab div.)

Link to comment
Share on other sites

Thanks so much for your reply, i'll have to admit though everything you said went over my head, im totally new to php, all i know is html. The existing code came from a wordpress template.

 

Could you tell me where i would add the get_links("title=") function and where i would insert the path to the link? the exact place i want to link it to is on my site is at http://www.atomicminddump.com/?cat=3

 

Thanks Again!

Link to comment
Share on other sites

Thanks so much for your reply, i'll have to admit though everything you said went over my head, im totally new to php, all i know is html. The existing code came from a wordpress template.

 

Could you tell me where i would add the get_links("title=") function and where i would insert the path to the link? the exact place i want to link it to is on my site is at http://www.atomicminddump.com/?cat=3

 

Thanks Again!

 

It will be hard to do so without giving a long-winded lesson on Wordpress. I will give a site that has excellent tutorials on everything wordpress.

 

The get_links() function (of wordpress) prints out (to the page) all your links (that you set up in your admin area) in

<li><a href="?">?</a></li>

format... This can be added to your tabs. To do so, I'm afraid you will need to do some research. It is out of the scope of this post to explain it all.

 

So go through these series of tutorials and you should have little problem implementing what I am saying.

 

http://www.wpdesigner.com/2007/02/19/so-you-want-to-create-wordpress-themes-huh/

 

This guy explains it the best i've seen. Sorry I cant help more but hopefully it sets you on your way to being able to figure it out.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.