The code in this download folder enables you to add a special featured image which only displays on archives. The image you add will be different to the image displayed on single posts and pages.
The code enables you to :
- Add the archive only image using a custom field plugin like ACF or any other custom field plugin.
- Add your archive only image using custom fields native to WordPress.
- Use the Genesis > Theme Settings > Content Archives settings to choose your featured image size and alignment.
Shows a custom image added using ACF or WordPress custom fields ( by Image ID which you can see when viewing the image attachment details page ) displayed on archive pages using the content archive settings to choose the size and alignment.
Tested using the Genesis Sample & Navigation Pro child themes by StudioPress.
- # Remove or comment out the code for the genesis_do_post_image function located inside the navigation-pro > lib > image-functions.php like this :
- # Copy & paste the PHP code from the functions.php file to the end of your Navigation Pro themes functions file or to the end of the image-functions file.
- # Using ACF or WordPress custom fields, create a new field named archive_image. If using ACF, import file named 72894-acf.json file. If using WordPress fields, create a field like you see in the following screenshot and add the image id to the value field like this :
Leave a Reply
You must be logged in to post a comment.