• Resolved jan.pulpan

    (@janpulpan)


    Hi,

    i am making a new wordpress theme and i want that the sidebar is not included on the startpage.

    i am using the following code:

    <?php if($post->ID != ‘958’){ ?>
    <?php get_sidebar(); ?>
    <?php } ?>
    `
    But it isnt working.
    The curios thing is, that on older template works.

    Any ideas?

Viewing 3 replies - 1 through 3 (of 3 total)
  • maybe this help

    if (is_front_page()) {

    <?php if($post->ID != ‘958’){ ?>
    <?php get_sidebar(); ?>
    <?php } ?>

    }

    or combine it with

    is_home()

    Thread Starter jan.pulpan

    (@janpulpan)

    no it dont work ??

    I’m sorry i give wrong solution. so try change your code to

    if (!is_front_page() OR !is_home() ) {

    <?php get_sidebar(); ?>

    }

    Maybe you can earn more from Conditional Tags

    btw, what’s your meaning of the startpage ?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Exclude sidebar on specific page’ is closed to new replies.