• 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

How To Show Different Sliders on Selected Pages

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 › General Discussion › How To Show Different Sliders on Selected Pages

This topic is: not resolved

Tagged: Master Slider, Simple Hooks, simple sidebars, streamline pro

  • This topic has 3 replies, 2 voices, and was last updated 8 years, 10 months ago by Lauren @ OnceCoupled.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • August 5, 2014 at 10:59 am #117178
    bdmstory
    Participant

    URL: dhtenniscenter.org
    dhtenniscenter.org

    Theme: Streamline Pro

    Plugins: Master Slider, Genesis Simple Sidebars, Genesis Simple Hooks

    Challenge: I've successfully created and registered a new sidebar for the the site. Now using Genesis Simple Hooks, I need to get a different slider to show on the homepage and another one on say the "About page. To start, I'd like to have a Slider show on the homepage "only" and no sliders on the other pages or posts archives.

    Here is the code I'm successfully using in Genesis Simple Hooks to show the slider on "all" pages.

    <?php masterslider(1); ?>

    Thanks,

    Michael Story
    OC Nano

    http://dhtenniscenter.org
    August 5, 2014 at 11:19 am #117182
    Lauren @ OnceCoupled
    Member

    You want to add conditional statements to that PHP: http://codex.wordpress.org/Conditional_Tags


    We create mobile-first, PageSpeed-optimized, pixel-perfect custom themes! https://www.oncecoupled.com

    August 6, 2014 at 10:43 am #117371
    bdmstory
    Participant

    Thanks Lauren - but would you mind showing me an example of what would actually work for me so that I can plug it into the Simple Hook area? While I understand the concept of conditional statements, I just don't know how to write the full bit of code.

    Much appreciated!

    August 6, 2014 at 11:07 am #117384
    Lauren @ OnceCoupled
    Member
    <?php 
    
    if ( is_home() || is_front_page() ) {
         masterslider(1);
    }
    
    else if ( is_page( 'about' ) {
         masterslider(2);
    }
    
    ?>

    We create mobile-first, PageSpeed-optimized, pixel-perfect custom themes! https://www.oncecoupled.com

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘General Discussion’ 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

© 2023 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