Support » Plugins » if statements for excluding pages

  • Hi I am using a child theme based around Twenty Eleven theme.

    I have some css divs within the single-page.php and some pages need to be excluded not to use the css.

    for example
    <?php if(!is_single(‘gpx’) && !is_single(‘gpd-50’) && !is_single(‘gb-event’) && !is_single(‘equinox’) && !is_single(‘celeste’)){;?>blah blah<?php } ?>

    Is there a more efficient way to do for instance if I create the rule in the function.php and then called in a hook into the single-page.php? (I am not good at building the functions ;o))

    Any ideas would be appreciated as this if statement is going to have 25 pages.

  • The topic ‘if statements for excluding pages’ is closed to new replies.