How To Change The Backstretch Background Image On Specific Pages

Agency Pro and other Genesis child themes which include Backstretch, load the same background image on every page. If you want to use a different background image on 1 or more specific pages or posts, you’ll need to modify the code in your theme.

In this tutorial, i’ll provide 2 code snippets which give you to 2 different options to change the background image on any post or page.

The 1st snippet enables you to use the Custom Fields meta box native to WordPress for adding a image URL to any single post or page to change the background image.

custom-fields

The 2nd snippet enables you to use a plugin like ACF which creates a image upload field you can use to change the background image on any post or page.

acf

In both solutions, the name of the custom field is background_image

Tested on the Agency Pro child theme by StudioPress however the code should work on any theme using Backstretch for images.

Here’s the code for logged in members:

Related Tutorials

Join 5000+ Followers

Get The Latest Free & Premium Tutorials Delivered The Second They’re Published.