This thread is over two years old and may be outdated. Please create a new thread if you need help, or email us if you have an active Premium license.

Change header image on one page only

Open 20 replies premiumthemetheme-vantage
11 years ago · Last reply by Andrew Misplon 10 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.

Need fast email support? Get SiteOrigin Premium

Replies

20
  1. - ET 11 years, 21 days ago

    :-)

  2. Andrew Misplon Staff 11 years, 20 days ago

    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. Andrew Misplon Staff 11 years, 20 days ago

    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. Andrew Misplon Staff 11 years, 20 days ago

    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. - ET 11 years, 20 days ago

    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. Andrew Misplon Staff 11 years, 11 days ago

    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. Andrew Misplon Staff 11 years, 11 days ago
  8. - ET 11 years, 11 days ago

    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. Andrew Misplon Staff 11 years, 11 days ago

    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. - ET 11 years, 11 days ago

    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. - ET 11 years, 11 days ago

    It worked – thank you.
    – ET

    >

  12. Andrew Misplon Staff 11 years, 11 days ago

    Super, glad to hear that did the trick.

  13. - ET 10 years, 11 months ago

    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. Andrew Misplon Staff 10 years, 11 months ago

    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. - ET 10 years, 11 months ago

    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. Andrew Misplon Staff 10 years, 11 months ago

    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. - ET 10 years, 11 months ago

    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. Andrew Misplon Staff 10 years, 11 months ago

    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. - ET 10 years, 11 months ago

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

    >

  20. Andrew Misplon Staff 10 years, 11 months ago

    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.

Have a different question or issue?

Start New Thread