• 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

Genesis Responsive Slider: How can I exclude slider category from blog page?

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 › Genesis Responsive Slider: How can I exclude slider category from blog page?

This topic is: not resolved

Tagged: exclude category, genesis responsive slider

  • This topic has 7 replies, 4 voices, and was last updated 8 years, 11 months ago by Brad Dalton.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • May 13, 2014 at 4:38 pm #104981
    pcgs51
    Member

    I am working with Outlook Pro and the Genesis Responsive Slider. The slider plugin is built by adding slides to a post's featured image. This slider works fine but I am only using the slider as a slider and I don't need it to link to an article or anything. I don't want these "slider" posts showing up on my blog page.

    http://fitnesshalloffame.com/blog/

    My site is using static pages pointing to a home page and a page called blog for my blog posts.

    I've tried everything I can think of to remove them. How can I exclude them from my list of posts? I tried using the exclude feature in the Genesis settings but have to believe that is for something else because I still see the slider category posts in my list of posts.

    Thanks


    Thanks,
    pcgs51

    http://fitnesshalloffame.com/blog/
    May 13, 2014 at 4:51 pm #104984
    nerdworker
    Member

    Hello pcgs51,

    That should be exactly what the exclude feature is for. Are you sure you used the category ID and not the name? Try viewing this video example -- the first half should be what you need where she talks about excluding the category:

    http://thewpchick.com/studiopress-quick-tip-3-excluding-categories-on-your-blog-page/

    I hope that helps.

    Stefanie
    nerdworker.com

    May 13, 2014 at 4:59 pm #104988
    pcgs51
    Member

    Thanks nerdworker,

    Too funny, that is exactly the video I'm watching. Wondering why my settings aren't working. My category ID is 2. Like so:
    http://fitnesshalloffame.com/wp-admin/edit-tags.php?action=edit&taxonomy=category&tag_ID=2&post_type=post

    So I just type the number 2 into the box yes?
    I also tried selecting only one category for the blog page but all of the categories show up.

    I was wondering if this only works for non static pages but the video sure looks like her site is a static page scenario. What could be preventing this from excluding what I want?


    Thanks,
    pcgs51

    May 13, 2014 at 5:10 pm #104990
    pcgs51
    Member

    Well, I Googled a little more and while I do think that the Genesis settings should have worked, I did find a way to remove this category here: http://nataliegraham.me/how-to-exclude-a-category-from-your-main-blog-feed/

    I opted for door #2 which was adding this to my functions.php. The "2" indicating my category that I wanted to remove.

    function excludeCat($query) {
      if ( $query->is_home ) {
        $query->set('cat', '-2');
      }
      return $query;
    }
    add_filter('pre_get_posts', 'excludeCat');
    ?>

    I do wish the Genesis settings would have worked. They should have. Thanks for being there. Sometimes it really helps when you know others are out there pulling for you. Thanks nerdworker!


    Thanks,
    pcgs51

    May 13, 2014 at 5:14 pm #104992
    nerdworker
    Member

    I was just about to point you to that exact post, but you beat me to it! LOL

    I'm glad you got it. 🙂

    June 25, 2014 at 10:39 pm #111584
    kathiemt
    Participant

    I want to know what the video showed or did as I can't get it to play. Is there a text step-by-step somewhere that explains please?


    Virtual Assistant & Nature Photographer
    Kathie Thomas: VADirectory – Click here for Australian images

    June 25, 2014 at 10:41 pm #111585
    kathiemt
    Participant

    Actually I worked it out, just with the description she has above the video. Worked a treat!


    Virtual Assistant & Nature Photographer
    Kathie Thomas: VADirectory – Click here for Australian images

    June 26, 2014 at 2:07 am #111597
    Brad Dalton
    Participant

    Use pre_get_posts http://codex.wordpress.org/Plugin_API/Action_Reference/pre_get_posts#Exclude_categories_on_your_main_page


    Tutorials for StudioPress Themes & WooCommerce.

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