Is it possible to filter blog posts on blog page?

Support Forums for LiveMesh Themes & Plugins Forums Agile Theme Support Is it possible to filter blog posts on blog page?

Tagged: , ,

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #12475
    dcerecedo
    Member

    I have created a blog page but it shows all blog posts. I can’t see any place to filter posts by category. Is this possible on agile theme?

    Doing it with the blog shortcodes is not the way because they only show N posts and do not offer the option to paginate.

    Here is the current status of my blog. I’d like to show only posts with blog category.

    http://byteflair.com/es/blog

    Thanks in advance for your prompt support!

    #12520
    Raghavendra
    Moderator

    Sorry for the delayed reply. You can modify the page template template-blog.php file at line number 23 to filter by category –

    $query = array('posts_per_page' => intval(get_option('posts_per_page')), 'ignore_sticky_posts' => 0, 'category__in' => array( 2, 6 ), 'paged' => $paged);
    

    where you supply the category ids as explained here – http://codex.wordpress.org/Class_Reference/WP_Query#Category_Parameters.

    You can have this template file in your child theme if you do not want to modify the parent theme template file and you can even rename this as another page template and use it.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Agile Theme Support’ is closed to new topics and replies.