wp_get_archives and Conditional Tags
-
I have two quick questions. But here is how WP is being used, we are using it more in a CMS application, with a section for company news and press releases along with a blog. The post page is set to the blog and I’ve removed the news category from showing in in both the feed and blog post page. However I’m trying to add the wp_get_archives tag and can’t figure out how to remove the news category from showing.
This is what I was trying:
<ul> <?php query_posts("cat=-1"); ?> <?php wp_get_archives('type=postbypost&limit=5'); ?> </ul>
Clearly this doesn’t work, so want can I do to exclude cat. 1 from the archives?
Secondly, I’m using a CSS sprite Menu and using conditional tags to make the sprite turn to an active state when a visitor is on the page or a child page. However the code I am use will not turn the blog menu item to active when someone is one the blog page. Again the blog page is set to the post page in the reading setting in the WP-Admin Dashboard.
Here is that line of code:
<li id="blog"><a <?php if ( is_page('blog') || $post->post_parent == '95' ) { echo " class=\"active\""; } ?> href="blog">Blog</a></li>
Any reason way it just won’t work on that one page?
- The topic ‘wp_get_archives and Conditional Tags’ is closed to new replies.