Hopefully this will be a simple piece of code I will just add to my theme template but what I want to do is on each category page of my wordpress is to dynamically add the Description part at the top of the page.
So on my category page it goes then I want under it.
Does anyone know how to pull the Category Description into my theme?
<?php single_cat_title(); ?>
<?PHP echo category_description(); ?>
You can use that if you are inside the loop in the category page. That will echo out the description assigned to the category via the category section of the Wordpress admin panel.
Thanks guys will implement it now
Any way to get this to show also in a META Description?
Im trying this
<meta name='DESCRIPTION' content='<?php category_description(''); ?>'>
But its bringing back black in the content bit?
Im trying this
<meta name='DESCRIPTION' content='<?php category_description(''); ?>'>But its bringing back black in the content bit?
category_description() has to be inside the loop as I said earlier. I you want to have it inside the loop, you need to find a way to pass the category ID to the function:
<?PHP echo category_description(3); ?>
See Documentation: http://codex.wordpress.org/Template_Tags/category_description
Hey no I got it to work in the Category page fine thanks for that. The Category Description now shows on the page for example (http://www.pspcentre.co.uk/pspwallpapers/cars/)
Now I was thinking I should pull the description into the META Description for the Category, but I then wanted to pull the first say 100 Characters of the Post to give the Posts META Description.