WordPress.org

Forums

[closed] remove header image on single page twenty twelve (8 posts)

  1. johnnypass
    Member
    Posted 2 years ago #

    Hi All,
    I created a page on my site called "Blog" where all my posts appear. I'm using the twenty twelve theme and the Blog page is using the default page template. I want the header image that appears on other parts of the site to NOT show up on this Blog page. Is there a css solution or maybe a php solution to hide the header image for this one page? Or do I need to create a whole new custom page template for this one page?
    Thanks! J

  2. Andrew
    Forum moderator & snail smusher
    Posted 2 years ago #

    Is there a css solution ...?

    Yes.
    Find the unique class names applied to the pages <body> element.
    Then use those classes to prepend your CSS selector for the header image.
    Apply a style of display: none;.

  3. johnnypass
    Member
    Posted 2 years ago #

    Ah Ok,
    So I added

    img.header-image {
    display: none;
    }

    and that hid the header on all pages, not just the Blog page. I'm not sure how to define this for the Blog page only. I thought something like this

    body.page-id-539 img.header-image {
    display: none;
    }

    But it doesn't seem to work.

  4. Andrew
    Forum moderator & snail smusher
    Posted 2 years ago #

    Make sure your page-id-539 class has the correct name.

  5. alchymyth
    Forum Moderator
    Posted 2 years ago #

    the 'blog' page might have the body_class() output of .blog - use a browser inspection tool to find out...

    http://codex.wordpress.org/Function_Reference/body_class

  6. sakyant
    Member
    Posted 2 years ago #

    My problem is im using jigoshop with twenty twelve, and only way to get product thumbnail to show is to select the image as a default image in wordpress, but that also makes my default product image into the site banner on that product page 980 x 250 pixels!
    How can i stop default image being the custom header too?
    I need default image to be a product/post thumbnail, not a custom header.
    But jigoshop says that only twenty eleven and twenty twelve work as a theme.. which is a lie because it doesnt work due to custom header being defined by custom thumbnail, with no apparent way to separate these two taxonomies. Could somebody ennlighten me as to how to hack the code to stop twenty twelve from assuming the default thumbnail to be custom header?

  7. WPyogi
    Forum Moderator
    Posted 2 years ago #

    @sakyant - per the forum rules, please start your own thread. Your question is not at all the same as the OP here.

  8. raveonJenn
    Member
    Posted 2 years ago #

    Hi! I have the same issue as above, I would only like the header photo on the very first page only. I have the jetpack css editor open and I have tried some of what was posted above and on other css posts as well, but I can't seem to hide or remove from other pages.

Topic Closed

This topic has been closed to new replies.

About this Topic