![]() |
|
|||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hi there
Let's say I want the page title for my contact page to be "Contact ACME Pty Ltd" and for this to display as the H1 on the contact page BUT in my nav bar I want the link to read "Contact Us" How to achieve this? Thanks bongoman |
|
|||
|
You'll have to add the link to that page to WordPress' links manager (blogroll, etc.) to a category called "Thesis Nav" or whatever. You can name that link "Contact Us" with its address as the contact page.
Then in Thesis' options, choose to have that category of links used in your nav menu. It isn't much, but I put together a video tutorial of how to add links in this way. Hope it helps.
__________________
Rick Beckman, Kingdom Geek & Thesis Support Ninja (Forums Moderator) [ Thesis Manual | Help, my posts don't show up! ] Amazon Wishlist | My custom.css Get Thesis! | Earn Cash as a DIY Affiliate! |
|
|||
|
I've implemented that approach and the video was very useful - thanks.
However I notice that the li's that form the tabs aren't getting the same classes they were as so that the current_page_item class isn't being set it seems on the active tab. I notice that at A 3-column template system with spectacular typography and customizable, rotating images — Thesis Theme for WordPress that the internal links in the main top nav bar are correctly showing as the current page so maybe I'm missing something. |
|
|||
|
Well, you're not missing anything so far as my tutorial goes... Not sure what Chris may be doing differently. You could try messaging him here (name: diythemes) to point him to this thread, in case he doesn't see it.
__________________
Rick Beckman, Kingdom Geek & Thesis Support Ninja (Forums Moderator) [ Thesis Manual | Help, my posts don't show up! ] Amazon Wishlist | My custom.css Get Thesis! | Earn Cash as a DIY Affiliate! |
|
|||
|
Quote:
I had a brief look at the code and see no reason why your menu shouldn't work the same way. Unless using it as a bookmark adds some extra code, which interupts the class.
__________________
kristarella.com – a blog about design, photography, Macs, Christianity, and other random life stuff Did you try validating? How to ask questions the smart way – help us to help you |
|
|||
|
Using a links category to output links into the nav menu doesn't take into account that you may be using those links to link to internal pages -- pages which you may be currently on. Therefore, the class for current pages isn't output.
You could try modifying /thesis/lib/functions/header_functions.php thusly to see if it works for you: Find this: Code:
$target = ' target="' . $nav_link->link_target . '"';
echo '<li><a href="' . $nav_link->link_url . '"' . $title . $rel . $target . '>' . $nav_link->link_name . '</a></li>' . "\n";
![]() Code:
$target = ' target="' . $nav_link->link_target . '"';
if ($nav_link->link_url == $_SERVER['REQUEST_URI'])
$class = ' class="current_page_item"';
echo '<li><a href="' . $nav_link->link_url . '"' . $title . $rel . $target . $class . '>' . $nav_link->link_name . '</a></li>' . "\n";
__________________
Rick Beckman, Kingdom Geek & Thesis Support Ninja (Forums Moderator) [ Thesis Manual | Help, my posts don't show up! ] Amazon Wishlist | My custom.css Get Thesis! | Earn Cash as a DIY Affiliate! |
|
|||
|
I asked Chris about this a few weeks ago (it's on the boards here somewhere).
He said the easiest thing would be for him to add a neat fix in the update. He's currently doing something hacky on his own Thesis page as I understand it. best M |
|
|||
|
OK, I got it working after modifying the code sample above to:
Code:
$target = ' target="' . $nav_link->link_target . '"';
if ($nav_link->link_url == 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'])
{$class = ' class="current_page_item"';}
else
{
$class = '';
}
echo '<li' . $class . '><a href="' . $nav_link->link_url . '"' . $title . $rel . $target . '>' . $nav_link->link_name . '</a></li>' . "\n";
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|