• 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

Education Theme, Choose Category for home page posts

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 › Education Theme, Choose Category for home page posts

This topic is: not resolved

Tagged: custom loop, education, home page

  • This topic has 4 replies, 3 voices, and was last updated 10 years, 4 months ago by Sumu.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • May 3, 2013 at 8:33 pm #39201
    ameeker
    Member

    How can I define the category the posts are being pulled from using the education theme on the home page (above the footer, not in one of the widgetized areas).


    Looking for Genesis website design backed by strategy? http://www.angiemeekerdesigns.com

    May 6, 2013 at 5:30 pm #39632
    Sumu
    Member

    I asked this myself too (probably many people do). I  was only able to limit the amount of  posts under the standard reading settings (not the Genesis Theme settings).

    Let us know if you find out.

    Sumu

    May 10, 2013 at 8:58 pm #40415
    joycegrace
    Participant

    I also am looking for a way to display only one category on a Genesis home page, using the Balance theme. Let me know if you find out how to do this


    Find me at Joyce Grace (http://www.joycegrace.ca)

    May 10, 2013 at 9:09 pm #40416
    joycegrace
    Participant

    Ok I found something thanks to Brad here: http://www.studiopress.community/topic/excluding-category-from-grid-loop/ - this solution was originally give to exclude categories from the home page, see his post there to learn more about that

    Try this, but change your category ID accordingly:

    /** Home page display one category only */

    add_action( 'pre_get_posts', 'exclude_category_posts_home' );

    function exclude_category_posts_home( $query ) {

    if( $query->is_main_query() && $query->is_home() ) {
    $query->set( 'cat', '4' );
    }

    }

    Put this in the functions.php file


    Find me at Joyce Grace (http://www.joycegrace.ca)

    May 24, 2013 at 9:59 am #42489
    Sumu
    Member

    Thanks, Grace. Will give it a shot.

     

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