• 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

Beautiful Pro only show certain category on homepage

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 › Beautiful Pro only show certain category on homepage

This topic is: not resolved

Tagged: blog, categories, homepage

  • This topic has 3 replies, 3 voices, and was last updated 10 years, 4 months ago by socialspark.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • June 25, 2015 at 7:50 am #157502
    socialspark
    Member

    I'd like for my homepage to only display the posts from one specific category, but I'm using the "front page displays: your latest posts" setting because this theme doesn't have a widget area that I can use for Genesis Featured posts widget. How can I get my home page to display only a specific category?

    Thanks!

    http://www.carolinelord.com/
    June 25, 2015 at 8:15 am #157505
    Brad Dalton
    Participant

    There's different ways to do this http://wpsites.net/wordpress-tips/display-posts-in-one-category-on-front-page-of-genesis-theme/

    Try these first as i have other solutions also.


    Tutorials for StudioPress Themes.

    June 25, 2015 at 11:17 am #157518
    Genesis Developer
    Member

    Add this in your functions.php file

    function gd_show_posts_from_one_category( $query ) {
        if ( $query->is_home() && $query->is_main_query() && ( ! is_admin() ) ) {
            $query->set( 'cat', '40' ); //Replace ID 40 with your Category ID
        }
    }
    add_action( 'pre_get_posts', 'gd_show_posts_from_one_category' );

    Download Genesis Featured Posts Combo Widget | Simple Grid Layouts Plugin for Posts, CPTs and terms
    You can request new tips/help.

    June 25, 2015 at 9:13 pm #157550
    socialspark
    Member

    Thanks Brad. The first solution worked, but the "Next Page" link didn't work anymore, so I used your 3rd solution, the custom function similar to the other poster's, and that worked great. Thanks!

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

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