• Hi, first congrats on your theme great work.

    Quick question that i cannot find an answer for anywhere , how do i display a specific port category on the main page in the middle column ?
    Tried several widgets but none seems to work.

    Basically i want to display post from category A in middle column and posts from category B in the right one.

    Thank you

Viewing 1 replies (of 1 total)
  • Hi iwsf. Welcome to the Hueman forum. You can filter the posts in the main content area by using the WP pre_get_posts action hook in a child theme. If you don’t currently have a child theme you can install one with these instructions:
    http://docs.presscustomizr.com/article/239-using-a-child-theme-with-hueman

    Then add this function to your child theme functions.php file; change the ‘123’ to whatever category you need:

    function my_home_category( $query ) {
        if ( $query->is_home() && $query->is_main_query() ) {
            $query->set( 'cat', '123' );
        }
    }
    add_action( 'pre_get_posts', 'my_home_category' );

    For the sidebar you can use the theme Hueman Posts widget and select the category.

Viewing 1 replies (of 1 total)

The topic ‘display post category in main column’ is closed to new replies.