[resolved] Posts from specific category on presentation page (3 posts)

  1. bogastyle
    Posted 2 years ago #

    Can someone tell me how to show recent posts form specific posts on Mantra theme Presentation page.
    By default there are displayed latest posts from all categories.

    I'm using child theme for Mantra.
    I have 3 standard post Categories - Blog, Magazine, Courses.
    I want only latest posts from Blog category to be visible on Presentation page.

    Thank You in advice

  2. Jesin A
    Posted 2 years ago #

    Copy the content-frontpage.php from /wp-content/themes/mantra/ to /wp-content/themes/mantra-child/

    Edit line 14 and change it to

    <?php $the_query = new WP_Query( array('posts_per_page'=>$mantra_options['mantra_frontpostscount'], 'cat'=> 2) ); ?>

    Replace the number "2" in 'cat' => 2 with the category ID of "Blog"

  3. bogastyle
    Posted 2 years ago #

    Thank You Jesin!

    I have copy of content-frontpage.php in child theme, but somehow I missed this row. :)

    Problem is solved.

    Best Regards!

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic