Category Descriptions and pages
-
Hi – I’m using a theme but I’ve heavily modified it. Also I’m totally new to WP so please go easy. It seems the category links and monthly archive links share the same php page on my site, in this instance, Archive.php.
I want to display
<?php echo category_description(); ?>
in the template – and the cool thing is, when I paste this into archive.php it does render the category description – except when I want to view a Monthly Archived page, it throws a fatal error as it doesn’t like the code above (I guess as there is no category description say fo rthe month of “June” etc).What would be a good way around this? Can someone help me by writing an If else bit of code or do I need to set up separate php pages – one for categories and one for archives. Help, I’m well new at this!
Thanks
Sam
- The topic ‘Category Descriptions and pages’ is closed to new replies.