I have a match plugin for wordpress. In the backend I can register matches. These matches are then displayed on the home page with a shortcode. Currently, all matches are displayed but I would like to see only the 5 newest ones.
Code: https://codepen.io/anon/pen/RZLKZj
Website: http://ayb-esports.com
I want only the newest matches on the page.
The code provided doesnt build correctly. Raw PHP is output instead of the dynamic content. However, the issue should be in the wordpress query 'posts_per_page' => -1
will return everything, change this to 5