Archived topic
Category and Tag headings
6 replies · Started by Heath on December 18, 2014
Hi! Just bought all your add-ons, thanks for this resource! For reference, my site is http://notwrittenby.com/
I have two questions...
1) When someone clicks on a tag (I've placed a tag widget in my footer), how can I make it so that the tag title/header does not show up?
2) My navigation menu is set to redirect to the various categories. When a category is selected, instead of just the generic text heading, can I show an uploaded image banner instead of the category title?
Thanks!!
Hi Heath,
1. This CSS should work:
.page-header {
display: none;
}
2. You can do this using GP Hooks and some PHP if conditionals - if you'd like me to give you some sample code, let me know :)
I would love any help and/or code you're able and willing to provide! I'm VERY new to all this...
So... I went into GP Hooks (inside content container) and tried putting in:
<?php if("category name") ?><img_src="image.jpg" /><?php } ?>
But, it's not coming out right. I get a Parse Error. Do you know what I'm doing wrong? Sorry for my ignorance. Thanks!!!
You're looking for this function: http://codex.wordpress.org/Function_Reference/is_category
So:
<?php if ( is_category( 'Category name' ) ) : ?>
<img src="..." />
<?php endif; ?>
Thanks!!
You're welcome :)