We are transitioning over to a new forum platform. Please post new issues there. Existing threads will be dealt with here unless you choose to move them over. Visit the new forum

Forum

Thread tagged as: Question, Problem, Hosting

Blog Plugin

Hi,

Can anyone help in regarding this, I need to get the latest Blog Post per Category is it possible using this ? I'm using this code to get the blog post per category but I just need the latest post per category

echo '<h4>Community Update '.perch_blog_category($theCategory, true).'</h4>';
                            echo '<div class="well">';
                            $theVar = perch_blog_custom(array(
                                    'category'   => $theCategory,
                                    'template'   => $template,
                                    'count'      => $posts_per_page,
                                    'sort'       => $sort_by,
                                    'sort-order' => $sort_order,
                                    ));
                            $posts_displayed = true;
JRden Fadallan

JRden Fadallan 0 points

  • 6 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

You need to order them by date, and set count to 1. Then you will get one post and it will be the most recent.

Thank you so much for the help,

I do have another question how can I remove the next button on the show post ? or do I have to modify the template to remove it ?

Thank you and God Bless,

Drew McLellan

Drew McLellan 2638 points
Perch Support

Yes, you can just remove it from the template.