Custom Fields
Support MB Custom Post Type Permalink for CPT Archive of specific category

  • Creator
  • #28513
    Resolved Jorge

    On a regular post, we've got the /blog/category/category-slug/ structure. Is it possible to have the same structure for a custom post type?

    I've got a CPT, that has the Category taxonomy registered (default WP) and has got Archives enabled. The individual post and the archive page works without any issue. What I'd like to have as well is an "archive" page that will only show the CPT entries that have got a specific category assigned.

    What would be the best way to do that? Thanks a lot!

Viewing 3 replies - 11 through 13 (of 13 total)
  • Author
  • #28748

    Got that Long! Thanks a lot, it was quite easy to set that up knowing where to look. Thanks for the example.

    I've set it up to show on the Archive Page of a specific custom taxonomy archive, and it does show the view properly (replacing the content between the header and footer as you pointed earlier), but it doesn't filter out the posts it shows all of them no matter if it matches the custom taxonomy or not. It doesn't really surprise me, since there's no actual reference/filter to it on the view itself, other than the display one.

    If I were using the "regular" WP categories, I'd add to the arguments the category->ID and would be done, ending up like this: {% set args = {post_type: 'documento', category: 39, posts_per_page: -1} %}

    But I'm not sure how do I add the custom taxonomy from Metabox to it? (I think the answer is right on my nose, but still not finding it).

    Thank you for your help, I'm understanding quite better how to seam together all the metabox' parts!

    Long Nguyen


    Please refer to this topic to know how to query posts by custom taxonomy


    Thank you Long, this reply did the trick to help me understand how that works.

Viewing 3 replies - 11 through 13 (of 13 total)
  • You must be logged in to reply to this topic.