You could create a custom page template and hard code the introduction and image and include template tag for showing all posts from this category below. In your navbar you link to that page instead of the parent category and in the dropdown you keep linking to the subcats.
Hey thanks do77. So, there is not really a way to add come content to that category?
I mean, like how we can add a FEATURED section on the home page or any regular page we would have to code in a condition like”
<?php if(is_FOO()) { include (TEMPLATEPATH . '/foo.php'); } ?>
Then just kind of “hack” at the menu code a bit?
I would actually create a new ‘page template’. Hardcode the introduction, add the template tag and then create a ‘new page’, choose the template you have just created and leave the page blank. And then hack the menu a bit, yes.
do77
Cool. You would think you could make there be some intro content on your category pages
http://codex.wordpress.org/Category_Templates
This might be what you are saying. I gotta read it all the way through π
Its actually not the way that I described but it definitely gives you the same result π
I believe you want the Page2Cat plugin. I have always wanted this functionality on my websites — I find this plugin very useful.
http://wordpress.org/extend/plugins/page2cat/
It allows you to write a page and assign that pages content to a category. You can also style the category intro how you like.
Hey Chris, I appreciate that. Everything is jumbled up here. I can’t figure out how this works.
Ok, that plug in for Category Page made me think about something.
I went into the ARCHIVE.php file. For the if_category condition, I took out the H2 tag for the archive title and replace a bit of html that I wanted to show. Lo and behold it worked perfectly!!
But, obviously this is on every dang category now. π
So I just need to tweak the condition to show which category to show which content for the header.
Now I just need to know how the conditional should be set up!
The Conditional Tags article would recommend using is_category()
.
AH Michael! Good deal, I was about to look for that page! I keep getting parse errors. I am trying to see if I use the slug or the ID.
Since the condition for my category will be determining if it is category FOO or category FOOTOO wouldn’t I throw in an elseif?
Right now it has `<?php /* If this is a category archive */ if (is_category()) { ?>
<h2 class=”pagetitle”>Archive for the ‘<?php single_cat_title(); ?>’ Category</h2>`
SO should it be elseif is_category(‘XX’))?
if (is_category('9') ) {
//do cat 9 stuff
} elseif (is_category('239') {
//do cat 239 stuff
}
Could I leave out the condition inside my parentheses on the elseif?
so:
if (is_category('9') ) {
//do cat 9 stuff
} elseif (is_category()) {
//do cat 239 stuff
}