How to display all posts in one category?
-
I don’t have background knowledge on php but I can follow instructions to the bone so please take your time to help me for this one simple request.
This is my website. I’ve set my homepage to show only 9 posts. When I click on my Categories, like kettlebell, I am shown the same number of posts.
What I want to know is how I can show ALL posts per category in one page. I’ve been trying to do this thing on cPanel where you’re supposed to paste
query_posts( array ( ‘category_name’ => ‘my-category-slug’, ‘posts_per_page’ => -1 ) );
in wp-includes/query.php but I don’t how to get it to work. This is the part where I usually get stuck. This is my reference:
https://codex.www.ads-software.com/Function_Reference/query_posts
I also tried to use the List Post Categories plugin but it didn’t work the way I wanted it to work so I want to try the PHP thing first and I also don’t like installing too many plugins.
Any help or recommendations will be appreciated
- The topic ‘How to display all posts in one category?’ is closed to new replies.