I am using a custom post structure, which ads a slug /travel-advice/before the post name. E.g. http://example.com/travel-advice/article-one/

I would like WordPress to use archive.php whenever I use the following url `http://example.com/travel-advice/

For custom post types it is possible to specify an archive page slug using ‘has_archive’ but what to do in case I want this for the default posts?

So far it gives me 404 error. The only solution I found so far is creating a page which uses a custom template and shows all default posts. Is there a way to do it differently through functions.php, for instance?

Read more here: Permalinks custom base to redirect to archive.php


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Wordpress related questions and answers: