Custom Page w/ Highlight
-
Hey. I’ve been working on this for the past two days and cannot figure it out for the life of me. I would like to add a page to my header that points to /wp-gallery2.php
First, my site: https://pbriscoe.com
This is the code I have entered into my header.php
<?php if (is_page()) { $highlight = ""; } else {$highlight = "current"; } ?>
<div id="mainmenu">
<ul class="level1">
<li class="<?php echo $highlight; ?>"><a>"><?php _e('Home','andreas09'); ?></a>
<li class=""><a href="/wp-gallery2.php">Gallery</a>
<?php
if(function_exists("wp_andreas09_nav")) {
wp_andreas09_nav("sort_column=menu_order&list_tag=0&show_all_parents=1&show_root=1");
}
?>
</div>
This has made the page, and it works when I click on it, however, it does not become highlighted, “Home” remains highlighted instead. I am trying to accomplish 2 things. 1) make is so when I click on the page (“Gallery”) it highlights and “Home” un-highlights. 2) I would like to be able to alter the page order. e.g. Make Gallery the third link rather than the second. Can’t figure this out since “Gallery” isn’t an actual page.
If anyone has any ideas on how to fix these issues, I would greatly appreciate it. Thank you!! :)`
- The topic ‘Custom Page w/ Highlight’ is closed to new replies.