Getting the permalink to the latest post from a category
This will work: $latest_post = get_post( array( ‘cat’ => YOUR_CAT_ID, ‘posts_per_page’ => 1) ) if( $latest_post ) { echo get_permalink( $latest_post->ID ); } Or you can do it in bulk for more categories: $categories = array( 7, 12, 14, 15 ); foreach( $categories as $cat ) { $latest_post = get_post( array( ‘cat’ => $cat, ‘posts_per_page’ … Read more