In this article I share the code to set Featured image as background for Header using Backstretch in Genesis. This way each Post and Page can have different Header (background) images. Summary: If a Page/Post/CPT entry has a Featured Image attached, use it as a background image for the Header. For Page/Post/CPT entry that does not have a Featured Image and other pages of the site like category archive pages, use a specific hardcoded image as the background image for Header. Screenshots Site's homepage using header-default.jpg from child theme's images directory for the header background: A static page having a Featured image. Header's background will be set to this image: Let's get started.
To view the full content, please sign up for the membership.
Already a member? Log in below or here.