getting current URI
-
Is there a way to compare the current location of the browser to a string?
I have a link that I want to style differently if you are currently on that page. The page in question is a category page so the normal get_post_uri() won’t work.<li class="<?php if ($custom_menu['url'] == /*current URI*/) echo 'current_page_item'; ?>"> <a href="<?php echo $custom_menu['url']; ?>"> <?php _e($custom_menu['label'],TEMPLATE_DOMAIN); ?> </a> </li>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘getting current URI’ is closed to new replies.