• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Multiple custom backgrounds in Beautiful Pro

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Multiple custom backgrounds in Beautiful Pro

This topic is: resolved

Tagged: background image, beautiful pro

  • This topic has 7 replies, 3 voices, and was last updated 11 years, 8 months ago by giddymoon.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • January 7, 2014 at 10:34 am #83822
    AMCS
    Member

    Hi I'm trying to build a custom site design based on the Beautiful Pro theme. I want to change the background/banner image (the large one that flows across the page) on each page.

    I think I could do this with css, using something like .page-id-XX .custom-background .site-header-banner {background: url(...);} each time, but that would mean the client won't be able to change the images themselves... Is there a way to change the way the theme pulls in the custom background and either

    a) have more than one custom background, or
    b) have it draw instead from a custom post type (for example)?

    I'd also like to replace it on the homepage with an image changer... but I can't work out where the background/banner is hooked in to unhook it... any ideas??

    Thanks, Andy

    NB - apologies for the TERRIBLE temp picks & content on this draft build...

    http://bol.andy-moore.com/
    January 7, 2014 at 7:29 pm #83931
    nutsandbolts
    Member

    Here is a tutorial for changing that area on different pages: http://wpsites.net/web-design/display-different-after-header-images-in-beautiful-pro-theme/


    Andrea Whitmer, Owner/Developer, Nuts and Bolts Media
    I provide development and training services for designers • Find me on Twitter and Google+

    January 8, 2014 at 6:05 am #83963
    AMCS
    Member

    Thanks - good tutorial. Still doesn't allow clients to change images after launch though...

    January 8, 2014 at 10:00 am #83999
    AMCS
    Member

    I could use something like

    remove_action( 'genesis_after_header', 'beautiful_site_header_banner', 5 );
    
    add_image_size( 'featured-banner', 2000, 300, TRUE );
    
    function amcs_featured_img() {
    	the_post_thumbnail('featured-banner');
    }
    
    add_action( 'genesis_after_header', 'amcs_featured_img', 5 );

    to use the featured image to set the banner for each page... (I think)

    but is there a way to still use the background image as default for when there is no featured image set?

    January 9, 2014 at 8:56 am #84167
    AMCS
    Member

    For anyone who's interested I solved the problem using the following

    // Adding option to use featured image (if it exists)
    // in place of background image
    
    remove_action( 'genesis_after_header', 'beautiful_site_header_banner', 5 );
    
    add_image_size( 'featured-banner', 2000, 300, TRUE );
    
    function amcs_featured_img() {
    	if ( has_post_thumbnail() )
    	the_post_thumbnail('featured-banner');
    	else {
    	echo '<div class="site-header-banner"></div>';
    }}
    
    add_action( 'genesis_after_header', 'amcs_featured_img', 5 );

    ...partly thanks to the tutorial nutsandbolts referred to above

    September 3, 2014 at 5:54 pm #122677
    giddymoon
    Participant

    Hi AMCS,

    I've tried your code and it works great except that the image is showing above the primary navigation not below.

    How would I adjust the php to place the banner image below the primary nav bar?

    Thanks!
    Linda

    September 4, 2014 at 4:43 am #122725
    AMCS
    Member

    Hi giddymoon

    The banner image and the primary nav bar are both pulling from the 'genesis_after_header' hook, so to make the image appear below the nav bar you just need to change the number on the last line of the code there...

    So instead of
    add_action( 'genesis_after_header', 'amcs_featured_img', 5 );

    you have

    add_action( 'genesis_after_header', 'amcs_featured_img', 15 );

    That should do it 🙂

    Andy

    September 4, 2014 at 7:57 am #122741
    giddymoon
    Participant

    Hi Andy,

    Magic! The new code works beautifully.

    Thanks so much.

    Linda

  • Author
    Posts
Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Multiple custom backgrounds in Beautiful Pro’ is closed to new replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble