- This topic is empty.
-
AuthorPosts
-
July 2, 2010 at 4:05 am #29522toby_fbaMember
So im creating a new wordpress site and i have a mixed navigation that uses pages and categories:
<div id="access">
<div class="nav-wrap" >
<ul class="group" id="example-one">
<?php wp_list_pages(‘&title_li’); ?><?php wp_list_categories(‘exclude=1&title_li’); ?></ul>
</div>
</div>I’ve got magic line working on the pages just fine. It even does the line under the category. However if im on the a category page the line break and defaults to the 1st page.
Perhaps im not targeting the current category properly.
CSS:
.nav-wrap {margin-left:165px;}
.group:after { visibility: hidden; display: block; font-size: 0; content: " "; clear: both; height: 0; }
*:first-child+html .group { zoom: 1; } /* IE7 */#example-one { margin: 0 auto; list-style: none; position: relative; width: 960px; }
#example-one li { display: inline; }
#example-one li a { color: #fff; font-size: 14px; display: block; float: left; padding: 6px 10px 4px 10px; text-decoration: none; text-transform: uppercase; }
#nav-one li a:hover { color: white; }
#magic-line { position: absolute; top: 0px; left: 0; width: 100px; height: 3px; background: #fff; }.current_page_item a, .current_page_item_two a { color: white !important; }
.current-cat a, .current-cat_two a { color: white !important; }The last line is the way im trying… but who knows im fairly new.
Any help would be much appreciated.
July 14, 2010 at 1:21 am #79726toby_fbaMemberCan anyone help with this?
My nav now works pretty much after hacking the nav
Code:<div id="header">
<?php $tcat = 3;?>
<?php $category_link = get_category_link( $tcat );?><div id="access">
<div class="nav-wrap" >
<ul class="group" id="example-one">
<?php wp_list_pages(‘&title_li’); ?><li <?php if(is_category($tcat)) echo ‘ class="current_page_item"’; ?>><a href="<?php echo $category_link; ?>" title="Competitions">Competitions</a></li>
</ul>
</div>
</div>
</div>BUT now when im on a single post obviously the current_page_item isn’t highlighted, anyone know how to get this working?
-
AuthorPosts
- The forum ‘Back End’ is closed to new topics and replies.