This code enables you to add content to the end of your archive pages like this.
The content is added using the Advanced Custom Fields plugin. If none added, you can display default text added on line 20 of the PHP code inside the archive.php template file.
If the ACF is not active or the text field doesn’t contain any content, your default text will be displayed.
By default, the code is written to show content after the loop of post excerpts on category & tag archives however you can change the conditional tags located on line 12 of the archive.php file to display content on any type of taxonomy or term page.
Shows you how to follow the installation steps to display unique content at the end of each category and tag archive page in Genesis child themes, Divi & Twenty Twenty.
Tested using the Genesis Sample child theme by StudioPress, Divi by Elegant Themes & the Twenty Twenty default theme for WordPress however will work in any Genesis child theme.
3 separate download folders included for use in different themes. See below.
There’s 2 steps :
- # Upload the archive.php file to your child theme folder like this :
- # Install the ACF plugin and import the acf-108813.json file.
Usage In Divi
Use this download in a Divi child theme if using Divi by Elegant Themes.
Usage In Default WordPress Themes
Tested using the Twenty Twenty default theme for WordPress using the code in this download folder.
Leave a Reply
You must be logged in to post a comment.