Home>Support>Change header image on one page only

Change header image on one page only

By - ET, 9 years ago. Last reply by Andrew Misplon, 9 years ago.

Hello
Using Vantage Premium and would like a custom header that is different from rest of site on one page only.
Any suggestions / code would be greatly appreciated.

Site is www.laugh-masters.com.au
Page I want to change header on is www.laugh-masters.com.au /corp-training
Thank you.

URL: http://laugh-masters.com.au

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

  1. 9 years, 7 months ago - ET

    :-)

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

    Hi Eran

    We can try help out if the changes are relatively small, for larger changes you might need to consider some developer assistance (http://codeable.io). Please send through some specifics on what you’re after and we’ll see if we can lend a hand.

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

    So it looks like you’re looking to change the logo on the corps training page, is that correct? Do you a url for the alternative logo? If not, please upload it to your Media Library, and then grab the url from the right column box.

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

    I can jump in here again early next week. If you want to move ahead, we’ll be doing this:

    Thread: We want to change out our logo only on our home page… and do it for normal & retina variants

    But instead of of is_front_page we’ll be using is_page(): http://codex.wordpress.org/Function_Reference/is_page.

  5. 9 years, 7 months ago - ET

    That’s great – Thanks Andrew.
    Here are links to retina and regular new headers for the Corp Training page.

    Retina: http://laugh-masters.com.au/wp-content/uploads/2015/02/lma_corptrain_header_ret.png
    Reg: http://laugh-masters.com.au/wp-content/uploads/2015/02/lma_corptrain_header.png

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

    Thanks for the wait. Please try this child theme:

    https://siteorigin.com/wp-content/uploads/2015/02/vantage-child-et-specific.zip

    You can install from Appearance > Themes > Add New > Upload Theme.

    I forgot we actually need the image ID’s. So once you’ve activated the child theme you still need to head to Appearance > Editor, edit functions.php in the child theme. There, on lines 27 and 36 you’ll need to change the integers 763 and 766 to match the ID’s of your own two images. To get those ID’s just view the images in your media library, the ID is in the actual URL that’s visible in your address bar.

    It’s normal for menu and Customizer settings to reset when activating a child theme.

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

    I re-uploaded with a small change. Link is:

    https://siteorigin.com/wp-content/uploads/2015/02/vantage-child-et-specific.zip

  8. 9 years, 7 months ago - ET

    Thanks Andrew,
    Can I use your new child theme if I’m already running a child theme?
    If I upload yours, won’t it undo all my existing child theme tweaks and changes?
    – ET

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

    In that case, un-zip my child theme, grab the last function from functions.php and insert it into your functions.php. Do you have an existing functions.php file in your child theme?

  10. 9 years, 7 months ago - ET

    Yes, I do have a functions.php for my child theme.
    I will take the last function from the unpacked child theme you sent and add that in, then follow your instructions from before and see how we go.
    Cheers,
    – ET

    >

  11. 9 years, 7 months ago - ET

    It worked – thank you.
    – ET

    >

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

    Super, glad to hear that did the trick.

  13. 9 years, 6 months ago - ET

    In this same vein, if I want to change header on multiple pages (using the same new secondary header art) how would I do that? I tried duplicating the code you gave me with the new post id’s, but it crashed the site.
    Thank you.

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

    Try this:

    /**
     *  Change the logos on the Corps Training page.
     */
    
    function vantage_child_change_logo($value){
    if( is_page( 1682, 1683, 1684 ) ) {
    	$value = 763;
    }
    
    return $value;
    }
    add_filter('siteorigin_setting_logo_image', 'vantage_child_change_logo');
    
    function vantage_child_change_retina_logo($value){
    if( is_page( 1682, 1683, 1684 ) ) {
    	$value = 766;
    }
    
    return $value;
    }
    add_filter('siteorigin_setting_logo_image_retina', 'vantage_child_change_retina_logo');
    
    

    See how I’ve added additional page ID’s, comma separated:

    1682, 1683, 1684
    

    Just replace those with your own.

  15. 9 years, 6 months ago - ET

    Thanks Andrew,
    I did try that – can’t get new headers to load on http://laugh-masters.com.au/corporate-training-faq/

    Tried all the usual thing like other machines, reseting browser, clearing cache etc.

    Am using this:
    /**
    * CHANGE THE LOGOS ON THE CORPS TRAINING PAGES. $value = (image id#)
    */

    function vantage_child_change_logo($value){
    if( is_page( 1682, 1754 ) ) {
    $value = 1783;
    }

    return $value;
    }
    add_filter('siteorigin_setting_logo_image', 'vantage_child_change_logo');

    function vantage_child_change_retina_logo($value){
    if( is_page( 1682, 1754 ) ) {
    $value = 1782;
    }

    return $value;
    }
    add_filter('siteorigin_setting_logo_image_retina', 'vantage_child_change_retina_logo');

    >

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

    Please try this for me:

    /**
     *  Change the logos on the Corps Training page.
     */
    
    function vantage_child_change_logo($value){
    if( is_page( array( 1682, 1754 ) ) ) {
    	$value = 763;
    }
    
    return $value;
    }
    add_filter('siteorigin_setting_logo_image', 'vantage_child_change_logo');
    
    function vantage_child_change_retina_logo($value){
    if( is_page( array( 1682, 1754 ) ) ) {
    	$value = 766;
    }
    
    return $value;
    }
    add_filter('siteorigin_setting_logo_image_retina', 'vantage_child_change_retina_logo');
    
  17. 9 years, 6 months ago - ET

    No dice.
    I get this – screenshot enc. on both pages in safari – alt text.
    In Firefox the correct second header shows up on the first page, but on the second I get the same alt text as on Safari.

    >

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

    Can you perhaps email us a zipped copy of your child theme? It’s not yet possible to email attachments to the forum (one day) so for now, please send to [email protected]. Thanks.

  19. 9 years, 6 months ago - ET

    Hey Andrew,
    Its working now – weird.
    Thanks again for your help and troubleshooting.
    Very cool.
    -E T

    >

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

    Really? Ok great, perhaps I did originally read the Codex correctly. Please then ignore the change I suggested via email. If the problem arises again we’ll take another look.

    Cheers :)

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