• 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 do I add a slider to a page-template?

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 do I add a slider to a page-template?

This topic is: not resolved

Tagged: Sample Theme, slider

  • This topic has 3 replies, 2 voices, and was last updated 11 years, 6 months ago by upthink.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • April 22, 2015 at 7:13 pm #148852
    dnjeel
    Member

    How do I add "cyclone-slider-2" in a new page template in genesis sample theme?
    Want to place the slider after the main navigation, "genesis_after_header".
    Shortcode: [cycloneslider id="305"]
    PHP code: <?php if( function_exists('cyclone_slider') ) cyclone_slider('1916'); ?>

    Is this the correct code below to put in a page-template? Or is there a better way?

    add_action ( 'genesis_after_header', 'bw_add_slider' );

    function bw_add_slider() {
    if ( function_exists('cyclone_slider') ) cyclone_slider('305');
    }


    http://webbyra-wordpress.se/

    http://www.wimo.se
    April 22, 2015 at 11:12 pm #148861
    upthink
    Participant

    I believe the code should work. Is it causing you trouble?

    April 23, 2015 at 3:24 am #148873
    dnjeel
    Member

    No, it works. But it would be easier for the customer to do changes if I added a widget area and then the customer can drop a shortcode in it.

    Or, if you want diffrent sliders on diffrent pages, then this soluton isn“t so good.

    What you think?


    http://webbyra-wordpress.se/

    April 23, 2015 at 3:45 am #148877
    upthink
    Participant

    In that case - just register a sidebar (let's say call it "Slider-Sidebar"). And then call it up like this:

    add_action ( ‘genesis_after_header’, ‘bw_add_slider’ );
    
    function bw_add_slider() {
    dynamic_sidebar( 'Slider-Sidebar' );
    }
    

    Now use something like Display Widgets plugin to put in the shortcodes and control the page where you want to show a particular slider (basically by controlling where the widget shows up)

  • 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

© 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