• 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

Responsive slider working with multiple post types?

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 › Responsive slider working with multiple post types?

This topic is: not resolved

Tagged: responsive slider

  • This topic has 4 replies, 3 voices, and was last updated 10 years ago by Smaele.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • January 27, 2013 at 11:33 am #15342
    Smaele
    Member

    I use Genesis with a modified version of the Agency theme and the responsive slider. I also use a custom post type. I'd like to be able to use posts, pages and my custom post type in the responsive slider.

    To do this I tweaked the function 'genesis_responsive_slider_options_box' in admin.php by adding the following code:

    array_push ($post_types, 'any');
    natsort ($post_types);

    This gives the extra 'any' post type to select from in the dropdown box of the admin panel (responsive slider settings) and all seems to work well.

    My question: Is it possible to add this any option in the standard Responsive Slider? Or does it have unwanted side effects?

    February 1, 2013 at 6:46 pm #17283
    SoZo
    Member

    Sorry, I don't quite follow. You say you edited the slider and it's working but then ask if you can edit the slider? Confused 😉


    John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography

    February 2, 2013 at 12:32 am #17313
    Smaele
    Member

    Hi, sorry for the confusion. I did manage to change the original code of the responsive slider as described. With this change it is now possible to mix different post types (page, post en custom post types) in the slider.  But having changed the original code of the responsive slider will give issues once new updates are available. So, my question actually is for StudioPress to see if it is possible to make this change to the original responsive slider.

     

     

    March 5, 2013 at 11:58 pm #24488
    dianearmitage
    Member

    Hi Smaele,

    I'm simply wanting to know how we can be able to include a featured image in the slider with either a Post or a Page featured image. I think this is what you're trying to accomplish and if so, you should be able to modify the Function.php file under Appearance / "Edit" in your child theme.

    Let me know if you have a clear solution and thanks for your input so far!

    Michael

    March 6, 2013 at 12:31 pm #24574
    Smaele
    Member

    If I understand you correctly you'd like to know how I solved the question "how to add posts and pages in the genesis slider?".

    I tweaked function "genesis_responsive_slider_options_box" in the admin.php file of the genesis responsive slider by adding two lines of code, see: /*tweaked*/:

    ....
    $post_types = array_filter( $post_types, 'genesis_responsive_slider_exclude_post_types' );
    array_push ($post_types, 'any'); /* tweaked */
    natsort ($post_types);                     /* tweaked */

    foreach ( $post_types as $post_type ) { ?>
    ...

    This solution gives you the "any" option in the admin panel. Of course the downside of this 'solution' is it will be overwritten when a new version of the slider is installed.

    Hope this answers your question.

     

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 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

© 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