I registered blog
as a custom post type. This content is queried on the page page-actueel-blog
. But mydomain/blog
also serves content (by default titles are queried).
I don't want visitors to see this page /blog
since this is not designed / styled. Can I let WordPress redirect /blog
to page-actueel-blog
or should I do this in the .htaccess file?
Should I do this with htaccess, what is the proper redirect (since /blog
and page-actueel-blog
might both match blog)
I registered blog
as a custom post type. This content is queried on the page page-actueel-blog
. But mydomain/blog
also serves content (by default titles are queried).
I don't want visitors to see this page /blog
since this is not designed / styled. Can I let WordPress redirect /blog
to page-actueel-blog
or should I do this in the .htaccess file?
Should I do this with htaccess, what is the proper redirect (since /blog
and page-actueel-blog
might both match blog)
I solved my own question without breaking the url structure logic, as Krzysiek Dróżdż (thanks!) suggested.
I changed the page named /page-actueel-blog
to the custom-post-type 'archive' template. Pretty obvious, but I thought archive was something else entirely.
For whoever may have the same doubts: the archive template is the level up from domain/blogpost (single-mycustomposttypename.php); a collection page of all posts. I named it archive-mycustomposttypename.php
.