0
votes

I am new to WordPress and trying to use the List Category WordPress plugin to show posts by category on the home page. I have installed and activated the plugin and as given in their documentation (https://github.com/picandocodigo/List-Category-Posts/blob/master/readme.txt), added the following code to the index.php file to get posts by category name:

[catlist name="bike-rides"] (it is surrounded by ` on both sides, stackoverflow is formatting it)

On adding this code, this text shows up on the website instead of showing posts by this category.enter image description here

Can anyone please help? I am probably doing something very stupid so please bear with me.

1

1 Answers

1
votes

Hi can you please try this

<?php echo do_shortcode( '[catlist name="bike-rides"]' ); ?>

we should use do_shortcode function to insert shortcodes inside php files in wordpress, pls try it