In the Genesis WordPress group a user asked for a tutorial on how to add a wrap on the archive-description output. Since I have basically what he wanted on my own site and I´ve done it before I thought why not write a tutorial for it? Here´s the end result.
I will say this is one way of doing it. There are multiple other ways but it works pretty well. Here I show what I wrote on the Genesis Sample Theme.
There are 3 steps we need to do. Luckily we can do all of this in one single file.
- Add output at the desired place (after header)
- Remove standard output of genesis
- Write the needed function to get the output we want.
Step 1 (Final): Copy & paste this into your functions.php file
What this code does is the following.
First we check if we are on a archive, but not on a post type archive. If we are in a archive then we proceed.
We remove the default genesis archive-description output.
Now we have our first function which basically outputs two divs. In this case
Then we get the archive-description output and place it where we want.
Finally we close our previously opened divs.
Then we are done. If we want to style this in our style.css file later we can add .page-header as our class.
Hope this short tutorial has been helpful.