In GenesisWP Slack chat, a user asked:
I'd like to display featured image as a background to entry title and post info on home and archive pages. Can anyone point me to any tutorials, please! I've been trying to figure this out myself for the past two hours. Thanks!
genesis_attr
filter can be used to set the URL of featured image (if present) as a background image for .entry-header on archives in Genesis.
While the tutorial has been written for Genesis Sample child theme it should work with minor adjustments in any Genesis child theme.
Follow these steps.
Step 1
Add the following in child theme's functions.php:
To view the full content, please sign up for the membership.
Already a member? Log in below or here.
Warning: Invalid argument supplied for foreach() in /home/pixelita/public_html/wp-content/themes/genesis/lib/functions/markup.php on line 246
What shall I change there to make this work? I am using Genesis Sample theme.
Which version of Genesis are you using?
I’ve just implemented this tutorial on my test site running the latest versions of WP, Genesis & Genesis Sample and there are no warning messages.