Removing Link Attributes for a Category Currently Being Browsed
-
Hello everyone,
I would like to know how to remove the link attribute from a category that is currently being browsed. For instance, in my sidebar under the heading “Pages” the current page being viewed is not a link but is regular text. I did this with this script:
<li><?php if ( is_page('2') ) { ?>About<?php } elseif ( is_404() || is_archive() || is_category() || is_home() || is_page() || is_search() || is_single() ) { ?><a href="/about/" title="About Stuff">About</a><?php } ?></li>
where page 2 is my About page. How can I achieve this same thing in my categories without manually listing them as I have my pages? By the way, I am manually entering the links to my pages because the
wp_list_pages
call didn’t list the Home page. I guess I’m just weird like that.Thanks for your help,
~Jonathan
- The topic ‘Removing Link Attributes for a Category Currently Being Browsed’ is closed to new replies.