Display Posts List via Shortcode without a Plugin

Where you need this display posts

shortcode and what it will do?

display posts list via shortcode2 tipsmoon
The answer is that this shortcode will be used on pages where we want to display posts in gallery view. This is suitable when you want a page that showcase and display your posts in column and blocks instead of default wordpress archive style where all your posts show a thumbnail and excerpt in rows. It will attract the users and help them to understand about what you are presenting in your site’s web page. It also provide a quick view that users can engage and find their desired posts quickly. So it reduce your websites’s bounce rate in search engines and the users will spend more time on your page. Hence it will increase your SEO score in search engines to rank high in search results. Side by Side it increase your website look more beautiful. Lets do it. It is quite simple:-
Add following function to your Theme’s Function.php file

 

To Display posts properly, we have to add some css style in the theme default style.css file. This css style code is given below:

 

After applying this css code our shortcode is ready to use. to use this code you can put following short code in your  post or page.

 

This short code will show following result and display post in list view according to the category given. see image below:-

display posts list via shortcode tipsmoon

Here you can also check my post on How to Make Attractive Landing Page for WordPress Home Page

Spread the love

Leave a Reply

Your email address will not be published. Required fields are marked *