I have a webpage with posts which belong to specific categories (eg projects). I want to show the archive of a specific category like a page.
Status quo
The site structure is similar to this:
/
/our-work/
/our-work/projects <- here I want to have the archive for projects
/xyz
/...
I use the following settings:
category_base
= catpermalink_structure
= /news/%category%/%postname%/
I can access the projects-archive via example.com/cat/projects.
What I already tried
I tried the following without success:
Removing a page_for_posts
and setting it to a newly created page "news".
Including the following code in the .htaccess file before the wordpress section (with and without an [L]
: If I use [L,r=301]
I get a 301-redirect.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/our-work/projects/$ /cat/projects/
</IfModule>
I think there was a time where it worked somehow, but I can not remember how I did it. (Maybe the page only showed all posts, because it had no other info).
My Questions
- Is there a better way to do this? How? (I think about creating a real page and wring a shortcode, that includes/displays all posts in the projects category)
- If not - How can I do that?
- Is it possible to have the posts of this category in this "subdirectory" like /our-work/projects/acme?