• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

exclude multiple pages in GSH

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › exclude multiple pages in GSH

This topic is: not resolved

Tagged: exclude pages php, GSH

  • This topic has 1 reply, 2 voices, and was last updated 11 years, 8 months ago by Lauren Gaige.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • July 13, 2014 at 7:13 pm #114189
    senordeer
    Member

    Hi, I want to prevent a slider from appearing on certain pages of my site using GSH. The code I have placed now is as follows:

     <?php
    if(!is_page(9, 2 ) ) { ?>
    <div style="margin-top:5px; margin-left:-20px;">[rps]</div>
    <?php }
    ?>

    I just want to specify multiple pages and am not sure of the format, should I use commas, parentheses, etc?

    http://www.jacksonlambertdesign.com/
    July 21, 2014 at 10:18 pm #115314
    Lauren Gaige
    Member

    Hi there!

    If you're wanting to remove it from more than one page ID, you'll need to write it like this:

    is_page( array( 42, 54, 6 ) )

    swapping out the page ID's with your own.

    For more info on this, check the link below on how Conditional tags can be written:

    http://codex.wordpress.org/Conditional_Tags

    Hope this helps!


    Lauren
    http://www.restored316designs.com

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble