CPT posts listed by category with custom rewrite URL, please help!

I did look at your code and saw you changed the original code.

To make it more clear what you can achieve with this snippet. You would end up with the following permalinks:

/recetas-argentinas/category/desserts

Shows all post with the post_type recetas-argentinas and with the
category desserts.

/recetas-argentinas/my-single-recept-post

Shows a single post of the post_type recetas-argentinas.

I did just use the code snippet from the original link and it was working for me.

Here is a screenshot of the rewrite analyzer to show how it works. Basically you enter a URL in the input field on the top and the plugin will show you which rewrite-rules will be matched by this URL:

Showing usage of Monkeyman Rewrite Analyzer

Also please be aware that the Category base in your permalink settings also has a influence to this. To have a permalink structure like above you would have to leave it empty.

Hope this is helping you to reach your target.


Old answer

Not sure I totally get your question, but from the following two sentences:

I’ve managed to use WP_query to create a page template […]
However, I can’t figure out the URL structures or slugs for this filtered category archive

A page template doesn’t have a permalink-structure. It’s nothing more then a template assigned to a single page – even if you use it to display a “archive like” list of posts.

Two other suggestions:

  • For any rewrite problems (especially if it’s about conflicting rewrite structs) it’s a good idea to debug your permalinks with the Monkeyman Rewrite Analyzer.
  • register_post_type() has extensive support for creating custom permalink options which can help you avoid permalink conflicts.

Even if this is no direct answer to your question, I hope this is helping you somewhat further.