Support » Themes and Templates » twentytwelve remove get header

Viewing 8 replies - 1 through 8 (of 8 total)
  • Moderator Andrew Nevins

    (@anevins)

    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;
    }

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

    Moderator Andrew Nevins

    (@anevins)

    Oops, misunderstood. Nevermind.

    Michael

    (@alchymyth)

    Forum Moderator

    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

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

    Michael

    (@alchymyth)

    Forum Moderator

    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):

    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;
    }

    I just went for display:none

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘twentytwelve remove get header’ is closed to new replies.