WordPress.org

Forums

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

  1. bogastyle
    Member
    Posted 1 year ago #

    Hi,
    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
    Member
    Posted 1 year 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
    Member
    Posted 1 year 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