• 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 Developer

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
  • Profile
  • Topics Started
  • Replies Created
  • Engagements
  • Favorites

Forum Replies Created

Viewing 4 posts - 1,341 through 1,344 (of 1,344 total)
← 1 2 3 … 66 67 68
  • Author
    Posts
  • December 11, 2013 at 12:41 pm in reply to: Limit Search Results to Blog Posts Only #78374
    Genesis Developer
    Member

    Ok. remove the above function and use this code

    add_action( 'pre_get_posts', 'only_blog_post' );
    function only_blog_post( $query ) {
    
        if( $query->is_search ) {
              $query->set( 'post_type', array('post') );
        }
    
    }

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

    December 10, 2013 at 1:31 pm in reply to: Limit Search Results to Blog Posts Only #78107
    Genesis Developer
    Member

    sorry! typo mistake

    use this

    add_action( ‘pre_get_posts’, ‘custom_post_limit’ );
    function custom_post_limit( $query ) {

    if( $query->is_search && (get_post_type() == ‘post’) ) {
    $query->set( ‘posts_per_page’, ‘PUT YOUR LIMIT HERE’ );
    }

    }


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

    December 10, 2013 at 1:12 pm in reply to: Limit Search Results to Blog Posts Only #78100
    Genesis Developer
    Member

    Try this

    add_action( 'pre_get_posts', 'custom_post_limit' );
    function custom_post_limit( $query ) {

    if( $query->is_serach && (get_post_type() == 'post') ) {
    $query->set( 'posts_per_page', 'PUT YOUR LIMIT HERE' );
    }

    }


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

    December 10, 2013 at 1:03 pm in reply to: Modern Portfolio, show category on Front Page #78097
    Genesis Developer
    Member

    Check the "show post meta" checkbox. Then category list will display on front page


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

  • Author
    Posts
Viewing 4 posts - 1,341 through 1,344 (of 1,344 total)
← 1 2 3 … 66 67 68
« Previous Page

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