Home>Support>Different Masthead Images / Background Images

Different Masthead Images / Background Images

Dear Support-Team

I’m using the vantage theme and was wondering if it’s possible to have different masthead background images for every single page. Is there a way to design the mastheads individually for the different pages of the menu?

My second question is similar: Is it possible to set a background picture for a specific page (and not one for all of them)?

Thank you for your help and best regards,
Lucas

URL: http://www.lucasmartin.ch/

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 10 years, 4 days ago Greg Priday
    Hi, I Work Here

    Hi Lucas

    For your second question, there’s a plugin that seems to do this. I haven’t tested the plugin (and WordPress says it hasn’t been updated in a while), but it might do the trick.

    https://wordpress.org/plugins/background-per-page/

    As for your first question, This is slightly more difficult and is something we unfortunately don’t support at the moment.

  2. 10 years, 2 days ago Lucas Martin

    Hi Greg, thank you for the prompt answer!

    The plugin does not work it’s showing the picture below the footer and not in the background of the page… Is there any other possibility?

  3. 10 years, 1 day ago Andrew Misplon
    Hi, I Work Here

    Hi Lucas

    If needs be please watch our Custom CSS video here: https://siteorigin.com/basics/modifying-theme-design-with-custom-css/

    Use your browser’s developer tool to inspect the page source and find the unique body class for the page. For your home page it’ll be .home, your blog page will be .blog and for this page we’re on right now the unique body class is: .postid-4293

    You can use Custom CSS, prefixing each selector with the unique body class, to set a background. For example, for the masthead:

    .postid-4293 header#masthead {
    background-image: url("http://localhost/so/wp-content/uploads/2014/09/ujKaaIATKKx7vi5kkfQn__DSC39321.jpg");
    }
    

    Just swap out the body class and image url I’ve used there.

    For the page background you’d use:

    .postid-4293 #main {
    background-image: url("http://localhost/so/wp-content/uploads/2014/09/ujKaaIATKKx7vi5kkfQn__DSC39322.jpg");
    }
    

    If you’re prepared to jump in at this level, this is how you could accomplish this task.

  4. 10 years, 17 hours ago Lucas Martin

    Works perfectly, thank you Andrew! Can you also tell me how to change the logo (other coulor) for the pages in the masthead?

  5. 10 years, 17 hours ago Andrew Misplon
    Hi, I Work Here

    Are you asking how to adjust the site title color based on the page being viewed? If so that would be:

    /* Vantage Site Title Color */
    
    .postid-4293 header#masthead hgroup h1 {
    color: #666666 !important;
    }
    
  6. 10 years, 17 hours ago Lucas Martin

    No, I need to replace the black logo with a white one, because when I put a background image into the masthead and the logo is black you can hardly see it.

  7. 10 years, 17 hours ago Andrew Misplon
    Hi, I Work Here

    The logo can be changed globally from Appearance > Theme Settings > Logo. Does that answer your question?

  8. 10 years, 17 hours ago Lucas Martin

    The thing is on some pages the logo has to be black and on other pages it has to be white (depending on the background of the masthead, to have a good contrast).

    For example my Homepage-Masthead has no background image, so the best contrast is with a black logo, for all the other pages I put images into the background and then I have to replace the black logo with a white one so that you can still see it well.

    So my question is what I have to write into the Custom CSS to change the black logo into a white one.

  9. 10 years, 16 hours ago Andrew Misplon
    Hi, I Work Here

    This is unfortunately a lot more work and more complicated. You can see an example of us doing it here but only for the home page: https://siteorigin.com/thread/we-want-to-change-out-our-logo-only-on-our-home-page-and-do-it-for-normal-retina-variants/.

  10. 9 years, 11 months ago Lucas Martin

    Hey Andrew, thank you for your help until now. My website is nearly finished, there is just still this one thing with the logo on the following page:

    http://www.lucasmartin.ch/concerts/

    –> it has to be white since the black one is hardly visible.

    I tried to figure out how to do it with the thread you showed me, but it’s a litte bit to complicated and I didn’t want to do something wrong…

    I’d be very glad if you could tell me step by step what I have to do.

    Best, Lucas

  11. 9 years, 11 months ago Andrew Misplon
    Hi, I Work Here

    Try this:

    1. Create a child theme for Vantage: http://codex.wordpress.org/Child_Themes

    2. Using Text or another text editor create a file called functions.php and insert the following:

    <?php
     
    function vantage_child_change_logo($value){
    	if( is_page( 93 ) ) {
    		$value = 41;
    	}
    	return $value;
    }
    add_filter('siteorigin_setting_logo_image', 'vantage_child_change_logo');
    
    function vantage_child_change_retina_logo($value){
    	if( is_page( 93 ) ) {
    		$value = 41;
    	}
    	return $value;
    }
    add_filter('siteorigin_setting_logo_image_retina', 'vantage_child_change_retina_logo');
    
    ?>
    

    93 is the page ID that you want to change the logo on. 41 is the logo ID that you want to load. Change it to the logo ID the first time you see 41, the second time you see 41 change that ID to the Retina version of that logo.

  12. 9 years, 11 months ago Lucas Martin

    Ok, thank you.

    1. I created a child theme, this is my style.css:

     /*
     Theme Name:   Vantage Child
     Author:       SiteOrgin
     Template:     vantage
     Version:      1.0.0
    */
    
    @import url("../vantage/style.css"); 

    But it now suddenly changed my menu-bar putting in all the pages instead of just the ones I chose, also changing their order. And with the modification of the menu the design of the full header changed. What went wrong?

    2. The page ID of http://www.lucasmartin.ch/concerts/ is 21, the attachment ID of the white normal logo is 273, the attachment ID of the white retina logo is 274 –> so I put the following into the functions.php:

     <?php
     
    function vantage_child_change_logo($value){
    	if( is_page( 21 ) ) {
    		$value = 273;
    	}
    	return $value;
    }
    add_filter('siteorigin_setting_logo_image', 'vantage_child_change_logo');
    
    function vantage_child_change_retina_logo($value){
    	if( is_page( 21 ) ) {
    		$value = 274;
    	}
    	return $value;
    }
    add_filter('siteorigin_setting_logo_image_retina', 'vantage_child_change_retina_logo');
    
    ?> 

    Unfortunately it doesn’t change anything – where is the mistake?

  13. 9 years, 11 months ago Andrew Misplon
    Hi, I Work Here

    It’s unfortunately normal to see the following when activating a child theme.

    a. Menu assignments will be lost. Go to Appearance > Menus and re-save your menu to the primary location.
    b. All Customizer settings will go back to default. Be sure to open the Customizer in one tab before switching to the child theme. That way you can manually copy your settings over.

    Your logo is white now right? http://www.lucasmartin.ch/concerts/, wasn’t it black before?

  14. 9 years, 11 months ago Lucas Martin

    Ok, the second problem is solved, there was a spelling mistake in the name of the file. It’s white, great! Now there’s just the new problem with the menu-bar/the header left…

  15. 9 years, 11 months ago Andrew Misplon
    Hi, I Work Here

    For sure. Please see my answer regarding the activation of child themes above, points a and b.

  16. 9 years, 11 months ago Lucas Martin

    So I reactivate Vantage Premium, open the customizer, switch back to the child theme (leaving the customizer tab open), open a customizer at the child theme and copy everything over?

    (Just to be sure I’m not messing up everything now ;))

  17. 9 years, 11 months ago Andrew Misplon
    Hi, I Work Here

    That’s it.

    Switch back to the parent theme. Open the Customizer. Now open a new tab, in that new tab re-activate your child theme, go to the Customizer. Now you have two tabs, one with the parent Customizer and one with the child theme Customizer, you can now manually copy your settings over.

  18. 9 years, 11 months ago Lucas Martin

    Wow, thank you, the page starts to look really cool! What do I have to write into functions.php if I also want to try out the white logo on page ID 15?

  19. 9 years, 11 months ago Andrew Misplon
    Hi, I Work Here

    Un-tested but you could give this a try:

     <?php
     
    function vantage_child_change_logo($value){
    	if( is_page( 21 ) && is_page( 15 ) ) {
    		$value = 273;
    	}
    	return $value;
    }
    add_filter('siteorigin_setting_logo_image', 'vantage_child_change_logo');
    
    function vantage_child_change_retina_logo($value){
    	if( is_page( 21 ) && is_page( 15 ) ) {
    		$value = 274;
    	}
    	return $value;
    }
    add_filter('siteorigin_setting_logo_image_retina', 'vantage_child_change_retina_logo');
    
    ?> 
    
  20. 9 years, 11 months ago Lucas Martin

    Unfortunately on both the pages the logos get black again – other suggestions?

  21. 9 years, 11 months ago Andrew Misplon
    Hi, I Work Here

    Sorry about my poor code there. Give this a try:

     <?php
     
    function vantage_child_change_logo($value){
    	if( is_page( array( 21, 15 ) ) ) {
    		$value = 273;
    	}
    	return $value;
    }
    add_filter('siteorigin_setting_logo_image', 'vantage_child_change_logo');
    
    function vantage_child_change_retina_logo($value){
    	if( is_page( array( 21, 15 ) ) ) {
    		$value = 274;
    	}
    	return $value;
    }
    add_filter('siteorigin_setting_logo_image_retina', 'vantage_child_change_retina_logo');
    
    ?> 
    
  22. 9 years, 11 months ago Lucas Martin

    Works! Very well done, thank you so much!!

  23. 9 years, 11 months ago Lucas Martin

    You guys really do a great, reliable job – I’d say it’s donating time now! Where can I do that?

  24. 9 years, 11 months ago Andrew Misplon
    Hi, I Work Here

    Super glad to hear that helped. If you’d like to make a small donation towards our Page Builder plugin which is still free no matter the theme you’re running, you can do so here: https://siteorigin.com/page-builder/donate/.

    Chat soon.

  25. 9 years, 11 months ago Andrew Misplon
    Hi, I Work Here

    We appreciate the support!

  26. 9 years, 11 months ago Lucas Martin

    Ok, done – thank you!

  27. 9 years, 11 months ago Andrew Misplon
    Hi, I Work Here

    Awesome, appreciate it. Thanks from everyone at SiteOrigin.

  28. 9 years, 9 months ago Newuser

    Hi I work with Vantage theme (not the premium version)
    Can I also change the background of only one special page. I tried the custom css and tried to figure out in the .css stylesheet file. However I am new here and not (yet) familiar with coding.

    My postid = 138

    .postid-138 #main {
    background-image: url(“background url link from my image library”);
    }

    This doesn’t work. Does this not work due to the normal version of Vantage? Thank you guys a bunch for this awesome theme and support btw.

    • 9 years, 9 months ago Andrew Misplon
      Hi, I Work Here

      Hi Newuser

      Please open a new support thread and we’ll be with you ASAP.

      Thanks

      Page: New Thread

  29. 9 years, 9 months ago Markus Böhlke

    Hi guys

    I work with Vantage theme (premium version).
    I want to Change the Bachground-Image for pageheader with custom-css for every single page.

    My page-id-2 ( Home – Site)

    .page-id-2 header#masthead {
    background-image: url(“background url link from my image library”);
    }
    

    My pade-id-108 (other Site)

    .page-id-108 header#masthead {
    background-image: url(“background url link from my image library”);
    }
    

    This doesn’t work. What´s wrong??

    Thanks for your support….

    • 9 years, 9 months ago Andrew Misplon
      Hi, I Work Here

      Hi Markus

      It’s possible your inverted commas aren’t plain text. Please can you open a new support thread for us and post a link to your site with the Custom CSS in place. We’ll help out ASAP.

      Page: New Thread

      Thanks

  30. 9 years, 7 months ago David Camilleri

    Hi there! This is exactly what I need too. Thanks for posting this, but being a newbie I’m having a few difficulties with the child theme. I have created a new child theme, named mamboshowtime_child. I have both of the files necessary and have included both the page id as you instructed, and also the logo attachment id. When I activate the child theme, the new logo comes up on the home page which is great, but the site looks all out of kilter.

    I have opened a new browser tab, and have activated a second instance of the site, and have now got both the customize sections opened for vantage premium and also my child theme. I have copied over all the details from the premium to the child – but still it looks pretty bad. Instead of a nice clean menu, I have instead (on the child theme), no more nice google circle icons, the menu is just a set of vertical links.

    My php file looks like this:

    My CSS looks like this :

    Theme Name: MamboShowTime
    Theme URI: http://mambocrowd.com/mamboshowtime-child/
    Description: MamboShowTime Child Theme
    Author: David Camilleri
    Author URI: http://example.com
    Template: vantage
    Version: 1.0.0
    License: GNU General Public License v2 or later
    License URI: http://www.gnu.org/licenses/gpl-2.0.html
    Tags: light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
    Text Domain: mamboshowtime-child

    Can you help me as to what I may be doing wrong?

  31. 9 years, 7 months ago David Camilleri

    OOps sorry forgot to post the php file, although I don’t think its relevant …

  32. 9 years, 7 months ago David Camilleri
    <?php
     
    function vantage_child_change_logo($value){
    	if( is_page(14) ) {
    		$value = 461;
    	}
    	return $value;
    }
    add_filter('siteorigin_setting_logo_image', 'vantage_child_change_logo');
    
    function vantage_child_change_retina_logo($value){
    	if( is_page(14) ) {
    		$value = 461;
    	}
    	return $value;
    }
    add_filter('siteorigin_setting_logo_image_retina','vantage_child_change_retina_logo');
    
    ?>
    
  33. 9 years, 7 months ago David Camilleri

    Hello!
    I’m so sorry to have wasted your time on this!
    I worked out what I was doing wrong.

    I forgot to include this in the php file :

    add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
    function theme_enqueue_styles() {
        wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
    
    }
    

    SORRY! Feel like an idiot now!

    (A quick message to the user above – I noticed in the reference material that the :

    @import url("../vantage/style.css"); 
    

    Is no longer used as best practice. The moment I switched to the new way of doing things – everything was working perfectly! Cheers and keep up your great work!

    • 9 years, 7 months ago Andrew Misplon
      Hi, I Work Here

      Glad you made progress here David, thanks for updating everyone.

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More