Display articles with a different template in the home page | Solved |

I am creating a theme for my site. I would like to display the last 5 articles on the home page but with a different display for the first articles.
So I created this code that I try to tweak but impossible to display the first article with the first template and the 4 others with the second template. I don’t know if it’s possible to do it the way I want to do it, but this way seems to be the easiest

Shortcode with ‘year’ parameter

I would like to display posts with a ‘year’ parameter. For example: to display posts from 2020, the shortcode should look like [archived-posts year=”2020″]. I have tried my code below but it’s not working. Maybe the ‘meta_value’ is not correct? Any help would be appreciate it.