I’m able to exclude some content (social networking links) from one page, but not multiple pages. The code I use in the page template is:
<?php if ( !is_page(911) ) : ?> <div style="padding-bottom:10px;"> <?php edit_post_link('Edit', '<p>', '</p>'); ?><span class="st_twitter_large" displayText="Tweet"></span> <span class="st_facebook_large" displayText="Facebook"></span> <span class="st_digg_large" displayText="Digg"></span> <span class="st_gbuzz_large" displayText="Google Buzz"></span> <span class="st_email_large" displayText="Email"></span> <span class="st_sharethis_large" displayText="ShareThis"></span> </div> <?php endif; ?>
That page doesn’t show the content listed, all others do. However, I want to also exclude these from eight other pages. I tried this code (only three shown here for example purposes):
<?php if ( !is_page(911) || !is_page(142) || !is_page(163) ) : ?>
When I did that, the content showed up on all pages including these three. I have more pages I want the social network links on than pages where I want them excluded. Any thoughts?
My URL: http://www.jrothraministries.com
- The topic ‘Excluding Content using is_page’ is closed to new replies.