Sunday, January 23rd, 2022

Add image before entry title on all archive page types

This code adds an image before all archive page type entry titles like this:

You can add your image via Customize > First Title Image and also add a default image named default.png in your child theme images folder.

demo video

Shows the image added via the customizer appearing before the entry title on all archive page types, including category, tag, and author archives.

Tested by StudioPress using Infinity Pro child theme, however it will work in any Genesis child theme.

installation steps

There are 3 stages:

  1. # Copy and paste the PHP code (without the opening PHP tag) from the functions.php file to the end of your child theme function file.
  2. # Upload your fallback image named default.png in your child theme images folder.
  3. # Copy the CSS from the style.css file and paste it at the end of your child theme style sheet and clear caching.

download folder

pay attention : If you are already using the code to add the image before the singular entry title, just add the second code snippet from the functions.php file.

reader interaction

Source link