WordPress.org

Forums

if statements for excluding pages (1 post)

  1. cocoonfxmedia
    Member
    Posted 1 year ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.