• Using WP 3.7.1 Firefox on a Mac.
    I am a non-coder newbie who needs help to eliminate header on specific pages.
    I have tried by cut and paste a number of suggestions to insert code in header.php.
    Here is the latest piece which did not work:
    <?php if (!is_page(‘page id=98’))) { ?>
    If someone has the patience I would greatly appreciate an up to date recommendation.

    Thanks for helping,
    Bill

Viewing 5 replies - 1 through 5 (of 5 total)
  • eliminate header on specific pages

    what exactly do you mean with ‘header’?

    what theme are you using?

    does the theme use body_class() in its body tag? https://codex.www.ads-software.com/Function_Reference/body_class

    can you post a link to your site?

    Here is the latest piece which did not work:

    please review https://codex.www.ads-software.com/Function_Reference/is_page

    Thread Starter FlaBill

    (@flabill)

    Thank you for responding.
    By header I mean the banner or upper portion of the page which in my case is an image.
    My theme is a Child theme of Twenty Thirteen
    I do not see body tag in the Header.php file.

    “https://wielert.net/wordpress”

    Thread Starter FlaBill

    (@flabill)

    My bad, here’s what I see in header.php
    <body <?php body_class(); ?>>
    Is that what you are looking for?

    with the page specific CSS classes, which are output by body_class(), you can use formatting to hide the header banners;

    do you also want to remove the site title and site description?

    add some formatting to style.css of the child theme:

    for just the banner image, try for example (replace the number in page-id-98with the page ID of your target page):

    .page-id-98 .site-header { background-image: none; }

    for the whole section including the titles, try:

    .page-id-98 .site-header .home-link { display: none; }

    Thread Starter FlaBill

    (@flabill)

    That worked fine…thank you.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Conditional style for a page’ is closed to new replies.