I am having problems with my navigation.
class="current" works when on Homepage and Categories only. Pages don't seem to pickup the class="current" echo.
Can anyone see anything wrong with the code in my header.php
I suck at PHP, any help much appreciated!!!!
[code moderated per forum rules - please use the pastebin]
datdesignguy
Member
Posted 11 months ago #
Hi boa,
you might try replacing this code:
<a href="<?php echo get_page_link($pageID);?>" <?php if ($page_id == $pageID || $pageID == $parent_id) echo "class='current'" ?>><?php echo get_the_title($pageID); ?></a>
with this:
<a href="<?php echo get_page_link($pageID);?>" <?php if(is_page($pageID)) echo 'class="current"';?>><?php echo get_the_title($pageID); ?></a>
Thankyou sooooo much my man!!!
Email me your Paypal I will buy you a beer.
datdesignguy
Member
Posted 11 months ago #
Haha, you're welcome, my friend. Glad I could help you out :)