Published on Nov 13, 2019

Featured Image as Background Image for Pages in Oxygen

Sridhar Katakam

This members-only tutorial provides the steps to automatically set featured image as the body background for static Pages in Oxygen.

We shall set up a fallback image for Pages that do not have featured images.

Step 1

Let's define a custom size for the body background images.

Install and activate Code Snippets plugin.

Go to Snippets > Add New.

Title: Custom Image Sizes

Code:

add_image_size( 'body-background', 1680, 1050, true );

Step 2

If your site's Pages already have featured images set, regenerate thumbnails.

Step 3

Add another Code Snippet.

Title: Set featured image as body background

Code:

This is a premium members-only content.

To view the rest of the content, please sign up for membership ($47/month or $499 one-time).

Already a member? Log in below or here.

tagschevron-leftchevron-rightchainangle-rightangle-upangle-downfolder-omagnifiercrossmenuchevron-downarrow-right