Support » Developing with WordPress » How to move background image from stylesheet to html?

  • Another newbie question but I searched around and couldn’t find anything definitive on this.
    I am using the Genesis ShowcasePro theme (see demo here) and want to know if there is a way to get the background image of the homepage out of the stylesheet and into the html?

    The background image is set via Appearance => Customize => Front Page Header Image

    I want to do this to allow the Cache Enabler plugin to see it and create a webP image for the cache. The webP image is 33% smaller than the current image format used. All my other images are converted but it can’t see this image.

    Your thoughts are appreciated!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator Steve Stern

    (@sterndata)

    Support Team Volunteer

    As you use a commercial theme and need support, please use their official support channel. We feel they are best equipped to support their products.

    https://my.studiopress.com/themes/genesis/

    Commercial products are not supported in these forums. As you are their customer I am sure they will have no problem supporting you there.

    @sterndata
    Thanks for the reply! I wasn’t looking for specific support regarding Genesis just trying to understand if (generically speaking) you can pull out a background image URL from a stylesheet and put it directly into the HTML. Just hoping to be pointed in the right direction on where to learn more about this.

    I only used the link to the demo site as a reference because I am new to WP and didn’t know if I properly spelled outlined my question with the correct terminology.

    Moderator Steve Stern

    (@sterndata)

    Support Team Volunteer

    If you want to change the header’s image from background to foreground, you’d have to rewrite code in header.php or elsewhere, so this is a theme issue.

    @sterndata

    Thanks for the clarification! When you say “background to foreground” does “foreground mean the HTML? And “background” means in the theme? Just want to understand the difference.

    Thanks!

    Moderator Steve Stern

    (@sterndata)

    Support Team Volunteer

    Background means that the CSS assigns it as a background to a div or other container. Foreground means it’s rendered as an <img> tag in the HTML.

    Thanks so much!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How to move background image from stylesheet to html?’ is closed to new replies.