This code snippet enables you to add a default featured image on each Edit Category admin page which is displayed on category archives even when a featured image has already been added to the Edit Post screen.
The code works based on how you configure the featured image using Customize > Theme Settings > Content Archives settings.
This tutorial has been published based on this question :
Shows the category image added to the Edit category screen overriding the default featured image on the category archive page. WIll also work with other taxonomy types.
Tested using the Genesis Sample child theme by StudioPress however will work in any Genesis child theme
There’s 2 steps :
- # Copy & paste the PHP code from functions.php to the end of your child themes functions file.
- # Install the free or premium version of the Advanced Custom Fields plugin ( ACF ) and go to Custom Fields > Tools > Import Field Groups and import the file named acf-103451.json.
You can then upload images for each category on the Edit Category page as seen in the demo video.
Leave a Reply
You must be logged in to post a comment.