WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] twentytwelve remove get header (9 posts)

  1. jknetdesign
    Member
    Posted 1 year ago #

    I want to make a splash page where I will have just a slideshow, not the header. I'm using the front page template and when I delete get_header(); it breaks the site.

    http://www.proto.annethullfineartdesigns.com/splash/

  2. Andrew
    Forum Moderator
    Posted 1 year ago #

    You can use a unique class in the <body> element to identify some CSS to only apply to that page.

    E.g

    .page-id-23 header {
     display: none;
    }
  3. jknetdesign
    Member
    Posted 1 year ago #

    Thanks but I prefer to unregister the header from this template with php somehow.

  4. Andrew
    Forum Moderator
    Posted 1 year ago #

    Oops, misunderstood. Nevermind.

  5. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    you can create any kind of page template, without the get_header(), but with the essential code before the body tag directly included in the template.

    http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates

  6. jknetdesign
    Member
    Posted 1 year ago #

    Thanks for the link, but that's my question. What is the essential code needed?

  7. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    What is the essential code needed?

    basically everything before the <body> tag - that is obviously needed for a valid html code, and for the linking of stylesheets etc;

    plus any html you will need for the web page structure.

    your idea was to have the 'header' not shown on the site - therefore you will need to remove all code that would cause an output of some sort, like the menu, the header image etc...

    here http://pastebin.com/iU6f8NFD is a bare minimum header section code which just outputs the two outer wraper divs, because footer.php will close them (if you want to edit the foter sectio as well, you can also change those two divs):

  8. jknetdesign
    Member
    Posted 1 year ago #

    Thanks for the link, but that's my question. What is the essential code needed?

    In the mean time I just applied:

    body.page-id-23 {
    	background: none !important;
    }
    .page-id-23 header {
     	display: none;
    }
  9. jknetdesign
    Member
    Posted 1 year ago #

    I just went for display:none

Topic Closed

This topic has been closed to new replies.

About this Topic