I’ve already written about how to display an image or HTML on all category archive pages using conditional tags and the Genesis Simple Hooks plugin.
This may be the solution you’re a looking for but it may not be which is why i have another solution.
It’s the easiest way to add HTML and display an image, links and text below your header but before your posts are listed on all category archive pages.
Archive Intro Text
Some themes offer built in field for Archive Intro Text.
Genesis is one of these themes which does and you can find the intro text field by going to Posts > Categories > Edit Category > Category Archive Settings > Archive Intro Text.
Add your text or HTML in the box and save the changes.
Plugin Solution
Rich Text Tags is a plugin developed by Zack Katz who knows a thing or two about making plugins.
This plugin adds an editor to all your category archives.
All you need to do is insert some HTML, an image, text and pretty much anything else you want to display above your category archive posts.
Simple solution which i personally use on this blog to display introductory content on all category and tag archive pages.
You can even add a short video intro if you like.
Edit Category Description
Once you install the plugin, you can easily add a description for each post category using HTML. Upload an image here to display it on different category archive pages.
Don’t forget you can use the advanced image settings to align and add horizontal and vertical spacing to your images.
Display Category Name
The category name will be displayed above all category archives however you can add a custom category name using this code if needed:
add_action('genesis_before_loop', 'display_category_name');
function display_category_name() {<br />
if(is_category()) {<br />
echo single_cat_title('Enter Text Before Category Name Is Displayed');
}}
This code displays the category title on the archives page for every category. You can add an array of category titles within the is_category() conditional statement of a single category only.
This tag will only work outside the loop which is why we use the genesis_before_loop action hook.
add_action('genesis_before_loop', 'display_category_name');
function display_category_name() {<br />
if(is_category('blogging')) {<br />
echo single_cat_title('Category for');
}}
This code will display Category for blogging before your intro text on the blogging category archive page only.
Can I Add Shortcodes To Category Archives?
I don’t think this is possible based on several unanswered forum questions posted recently.
I know someone was trying to work out how to use Gravity forms shortcodes in their category archives but the shortcodes do not seem parse properly.
If you know of a solution for this, please share it.
Was This Tutorial Helpful?