If you’re like me, you have many categories of posts, and you use, or want to use, a recent posts widget to provide a menu of recent posts of only a particular category. Sometimes in concert with with Content Aware Sidebars, you want to display a simple menu of posts on a page with a singular topic. You don’t need all the bells and whistles – just a simple menu.
You might have also recently discovered that the plugin you’ve been using for recent posts is no longer compatible with your theme (Avada).
I’m offering this simple script that you can add to your child-theme’s functions.php file. I’m offering it as is – so don’t sue me if it breaks your site – it shouldn’t. Add the PHP code below to your functions.php file and you can use the following shortcode to display the simple menu.
The “category” is the category ID, and “limit” is the max number of posts to show.