Conclusion news only thumbnail on the main page of the appropriate category, how to implement?

Actually the whole point of fit in the question.
I have a category from which I would like to display posts on the homepage, but not all posts there is a thumbnail because you need to set the condition only where there is a preview.
03996d4e2d144d99a5079052e62f11e1.jpg
Here is the prototype that I have imagined:)
Also when switching to mobile version I would like that it all turned into owl-carousel or what the alternative is but for posts.

The issue is very complex and big, I understand that many will say the road to freelancing, but I understand it for yourself, and maybe someone could advise me on where and what you can see on this topic?
June 26th 19 at 14:19
2 answers
June 26th 19 at 14:21
Solution
To determine whether the thumbnail will fit the function
https://developer.wordpress.org/reference/function...

Inside the loop output the posts to add a condition
if(has_post_thumbnail( $post->ID )) {

 // Here the conclusion of the post, which has a thumbnail

}
June 26th 19 at 14:23
Solution
The whole function looks like this
Last_posts = array(
 'numberposts' => 3,
 'post_status' => 'publish',
 'post_type' => 'post',
 'orderby' => 'post_date',
 'order' => 'DESC',
 'post_content' => ",
 ); 

$result = wp_get_recent_posts($Last_posts);

foreach( $result as $p ){ 
 $d = "Y/m/d";
 $pd = get_the_date( $d, $p['ID'] );

 $trimmed_content = mb_strimwidth( $p['post_content'],0, 130, "..." ); //a Limit of 130 characters

 if( has_post_thumbnail($p['ID']) ) // If there is no picture put the plug
{
 $thumbnail = get_the_post_thumbnail_url($p['ID'], large); //Uploading pictures post
}
 else 
{
 $thumbnail = get_bloginfo("template_url").'/no-image.png"'; //Loading stub from the template directory
}
 }

Find more questions by tags WordPressPHP