Can someone please help me figure out if the "List category posts" plugin is the easiest solution to my problem:
My goal is to be able to choose which posts are displayed on our homepage under "Latest News". Right now, all new blog posts published are featured in "Latest News." I'd like to be able to create new blog posts and based on the category selected, they will either show up on the homepage, or just be added to our blog.
This is the current code I have in the home.php
file for the "Latest News" box on my homepage:
<?php
$args = array( 'numberposts' => '5' );
$recent_posts = wp_get_recent_posts( $args );
foreach( $recent_posts as $recent ){
echo '<a style="font-size: 18px;font-weight: bold" href="' . get_permalink($recent["ID"]) . '" title="Look '.esc_attr($recent["post_title"]).'" >'.$recent["post_title"].'</a><p>'.$recent["post_excerpt"].'</p><hr> ';
}?>
We also have a Custom Field set up for "Content under Latest News." I'm not sure if my solution has anything to do with this. I'm familiar with HTML and CSS, and am in the process of learning more about PHP, so any suggestions on this question would be super appreciated!