How to change the posts category page URLs

Hi there,

I want to create a page to display all posts of a single category. Can you please direct me to the template for the posts category page?

Thank you

Hi,

Please note that this is a WordPress functionality, each category has its own page. To open it, go to WP Dashboard > Posts > Categories > and hover over the categories and click on the View button.

​I hope this is helpful to you.

Hi Andrii,

No, I need the php template for the single category page. I want to change the urls from example.com/category/news to example.com/news - so I need to add the template for each category (specifically the loop that displays the posts and the sidebar). Please advise.

Thank you

Hi,

Regarding templates, please check this doc: How to override template parts - HivePress Help Center then you can change the category.php file. As for the URLs, please check this tutorial Remove the Category Base from your URLs in WordPress

That is my problem. There is no category.php file in there. I’m wondering if its called something else? I need the posts page template.

Hi,

Please make sure that you are familiar with customizations, as there is no such file in the theme, you need to create it in a child theme and already based on the index.php from the main theme. If you’re not familiar with customization, I recommend hiring someone on Fiverr or Upwork or using the following links Remove the Category Base from your URLs in WordPress

Thanks Andrii. I didn’t want to remove the ‘category’ from all post urls, just wanted to display all posts of a category on a specific page. I found the loop that worked. Thank you.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.