Education Theme, Choose Category for home page posts

Community Forums Forums General Discussion Education Theme, Choose Category for home page posts

This topic is: not resolved

This topic contains 4 replies, has 3 voices, and was last updated by  Sumu 2 years, 2 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #39201

    ameeker
    Participant

    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

    #39632

    Sumu
    Participant

    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

    #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) and Clicks Online Marketing (clicksonlinemarketing.com).

    #40416

    joycegrace
    Participant

    Ok I found something thanks to Brad here: http://www.studiopress.com/forums/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) and Clicks Online Marketing (clicksonlinemarketing.com).

    • This reply was modified 2 years, 2 months ago by  joycegrace.
    • This reply was modified 2 years, 2 months ago by  joycegrace.
    • This reply was modified 2 years, 2 months ago by  joycegrace.
    • This reply was modified 2 years, 2 months ago by  joycegrace.
    #42489

    Sumu
    Participant

    Thanks, Grace. Will give it a shot.

     

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.