WordPress is one of the best platforms today for writing. With updates that add increasingly useful functions, it is crowning itself as the queen in this matter (one for example is that it allows you to add advertising in the tickets). Because of this, today you will learn how to display the latest entries in a category on a WordPress page quickly and easily.
And if what you want is to become the best at what you do (in this case create a blog or write), you must know all the functionalities of a page. The one to show the latest entries is a priority because it will allow you to publicize all your post at the same time, causing your visits to increase exponentially.
If what you want is to grow for you can also find how to show posts or pages anywhere in wordpress, that will complement what you will read now.
Show the latest posts of a category on a WordPress page
Despite what you read earlier, WordPress, like any page, also has its problems, one of these is that in the current widget you cannot show posts from a specific category but they appear altogether.
For this reason, to be able to show the last entries of a category on a WordPress page there are several tricks, the first would be to show the posts through the plugin. The first thing to achieve this task is to install the recent post widget extended plugin, download it and once you have it on your PC, activate it.
To achieve this you must go to the ” Back office ” section of WordPress, here you will get an option called “Add new” press it to take you to a page where you can search for the plugin you just downloaded (the search bar is located in the up to the right).
Once you get it press it to start its installation and subsequent activation. When you have completed this step go to ” Appearances ” and then to ” Widgets “, then add the recent post widget extended to the sidebar.
This plugin has multiple options, such as being able to show thumbnails of all your posts, but the one that matters to show the last categories is “Limit category”.
With this option, you can choose the categories with which you want all the posts to be filtered, which will allow the latest entries to be displayed in a widget. Then, edit what is necessary in the limit category and when you finish just hit ” Save “. Keep in mind that you can not only show the latest posts but also the shortcodes.
Plugin shortcodes
The shortcodes will allow the 10 posts of a specific category to be displayed in a widget, including the excerpts. You just have to copy this code: [rpwe limit = »10 ″ excerpt =» true »cat =» 15 ″] on the page where you want the 10 posts to appear and that’s it. You must change the number 15 which is the ID of the category, for the category you want.
Show by code
Another trick to show the latest entries of a category on a WordPress page is by using code. The first thing you have to do is add the code in the theme file where you want the last entries of a category to appear.
The code is as follows: <? Php $ catquery = new WP_Query (‘cat = 15 & posts_per_page = 10’); ?> <ul> <? php while ($ catquery-> have_posts ()): $ catquery-> the_post (); ?> <li> <a href= <<?php the_permalink() ?> »rel =» bookmark »> <? php the_title (); ?> </a> </li> <? php endwhile; wp_reset_postdata (); ?>
The second thing once you have pasted it is to edit the first line to create a query, where the ID 15 is replaced by one of the category from which you want to show the posts, this will let you see the title of these entries on the page that you chose.
And ready with that last one, you can now show the latest entries of a category on a WordPress page. You can use either of the two methods, as both are effective, however, if you are not good at using code then just use the first one. Now you are free to go to WordPress and start letting your imagination run as you like. And if you were hungry for more then you should look to correctly configure the reading settings and how to configure the writing settings, so that your blog looks classy and quality.