Link to home
Create AccountLog in
Avatar of jazzviolin
jazzviolinFlag for China

asked on

Click Tab Navigation in Wordpress K2 Theme, go to different URL

In Wordpress (K2 theme), it adds a navigation based on the Pages you add on your site.  I would like the tabs to click to a different URl.

Example:

Home   Services   About Us

I would like all of the tabs to click to different URls outside of my blog, in the same window.

Using Wordpress 2.3 final, K2 RC 2.
Avatar of nitinsawhney
nitinsawhney
Flag of India image

You could achieve this using javascript redirects

<script type="text/javascript">
<!--
window.location = "http://www.xyz.com/services.html"
//-->
</script>

Add the above mentioned code to all the pages you would like to link to external links and change the location accordingly.

Note: Add this to the code and not the WYSIWIG editor available in Wordpress.

Hope this helps.

Cheers
Avatar of jazzviolin

ASKER

I'd rather not use javascript redirects.  Is there a way to modify the <div> tag (sort of like how you modify a <div> for the header, if you want it to be clickable)?
yeah, piece of cake:

<div onclick="window.location='http://www.google.com'" style="cursor:pointer">Link To Google</div>

That'll also change the cursor when the mouse is hovering over it, so users will be able to tell it's a link.
ASKER CERTIFIED SOLUTION
Avatar of MasonWolf
MasonWolf
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer