Ready to get started?Download WordPress


if statements for excluding pages (1 post)

  1. cocoonfxmedia
    Posted 6 months 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.


You must log in to post.

About this Topic

  • RSS feed for this topic
  • Started 6 months ago by cocoonfxmedia
  • This topic is not resolved
  • WordPress version: 3.8.1


No tags yet.