I stumbled upon this article –
Essetially it explains that you can do stuff like this:
My question is how can you add to an URL a “post_type” parameter for custom posts?
I tried (example post type is “news”):
But it didn’t work.
When writing a wp_query, you would write something like this:
$query->set ( [‘post_type’ => ‘news’);
But I have to no idea how to put this in the URL.