Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #18539

    I need to display a different header logo image for one particular page (about)

    In page.php Can I substitute the header call from get_header(); to

    <?php
    if ( is_page( 'about' ) ) :
    get_header('about');
    else :
    get_header();
    endif;
    ?>

    Where header-about.php is the new header calling a different logo.

    Is there an better way please?

    #99843

    Hi HouseofStrauss,

    Which header image are you trying to change? It would be easier to do with css and a bit more efficient. Something like:

    #top.page-id-## .someclass{
    background-image: ;
    }

    Where the ## is the page ID and the .someclass is the class in the header where you want to change out the image. Then just use regular css background-image to assign the image you want.

    If you can point out specifically what it is, we can help out with the css.

    Regards,

    Devin

    #99844

    Thanks Devin for your reply. I want to change the logo in the header to be a different image on the about page only. ie all site pages show logo1.png in header, except ABOUT (id 11) page that shows logo2.png

    Thank-you

    #99846

    Hi,

    You can use css with a completely different image which will only be triggered on the above page and override the standard css for the header image. Use the css code Devin put up, it will work. Very cool way of doing it too +1

    Nick

    #99847

    Some little glitch here … My code in the custom CSS > in css admin box is

    #top.page-id-11 .logo{
    background-image: url(/wp-content/uploads/2012/12/about-logo.png);
    }

    and the new image is not showing on this logo. Page id11 is definitely correct. Any help on this please?? It looks like logo class, but maybe I’m wrong

    Thank-you

    #99848

    Hi HouseofStrauss,

    Can you post a link to your site? we can check it further.

    Regards,

    Ismael

    #99849

    Hi!

    That address is a temporary redirect.

    Thanks.

    Best regards,

    Ismael

    #99850

    Hi HouseofStrauss,

    Thanks, but I can’t access your site, it’s under maintenance mode and it redirects me to this page: http://keithkrasny.staging.wpengine.com/

    I can also see this error on your login page: Warning: Missing argument 2 for limit_login_track_credentials() in /nas/wp/www/staging/keithkrasny/wp-content/mu-plugins/limit-login-attempts/limit-login-attempts.php on line 769

    You can send the login credentials to sighlence13[at]gmail[dot]com, and kindly include a link to this thread on your message.

    Regards,

    Ismael

    #99851

    Hi Ismael, the code you added worked. I’ll add it in here as reference for others.

    To change header logo on page. This is Ismael’s code snippet that works. Page-Id should be changed to one you need to show a different header logo image. Change width and height and img URL to suit.

    .page-id-11 h1.logo a {
    display: block;
    width: 600px;
    height: 222px;
    background: transparent url('http://my-new-image.jpg') left top no-repeat;
    }

    .page-id-11 h1.logo a img {
    display: none;
    }

    Thanks for resolving this request.

Viewing 9 posts - 1 through 9 (of 9 total)

The topic ‘SENTENCE theme- show header image for specific page’ is closed to new replies.