• I have a taxonomy called “Countries” and it has a country list. The slug layout is simple, e.g. /country/usa/ or /country/canada/ . When you go to either URL, posts for those individual taxonomies show, posts from USA and posts from Canada. But if you go to /country/ you don’t see anything. I get “nothing found” in the standard WP templates.

    This should work like categories. If you go to /category/ you’ll get all posts for all categories. And categories pages are /category/cars/ or /category/uncategorized/

    I’m also wondering how one would show all posts in a post type. I would think it’s just as simple using /post-type/ and that should show all the posts. That’s the slug for the posts /custom-type/post-name-here/ and so removing the post name should show all the posts of that post type.

    Not quite sure what’s wrong but it would seem to work the same. Any ideas?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi,

    It works that way. “category” or in your case “country” is a just slug, it’s not existing page.
    If you created and allowed archive for your custom post type, it’s more likely /countries/ what will show all posts there.

    I don’t know what you use for create/manage custom post type, there you can chose your own slug/URL for archive and so on …

    Thread Starter thelaw

    (@thelaw)

    Peter – thanks for the response. Yes, I thought that the slug for the custom post type was /whatever/ and then that is what is used. I didn’t think that the plural form would create yet another slug for the post type and it wouldn’t make sense either.

    I’m not sure what’s going on now. I have a custom post type as, e.g. “regulations”. It’s a post that just will have a different set of attributes (taxonomy / categories) to tag it, e.g. country, industry, year initiated. So the slug is /regulations/ and every post is site.tld/regulations/reg-of-new-zealand-2010/ — makes sense. But all the regulations should be at site.tld/regulations/ — but this shows all the latest documents added to standard posts, not just the regulations post type. I type in site.tld/adsfadf/ with no plugins on except for a custom post type addon and I see the 4 sample posts I’ve made to WP’s standard posts. Makes no sense to me and can’t figure out what could be doing this. I’m using the stock WP theme.

    Hi,

    I am sorry, I was wrong about the slug. If you use custom post type “regulation” and set up everything well example.com/regulation/ has toshown up an archive for all posts under regulation custom post type.
    If this does not happen you set up your custom post type differently. Did you do this with code or some plugin?
    I do it with https://wordpress.org/plugins/custom-post-type-ui/
    If you do it without a plugin, just check that plugin that you can compare if you wrote well all details like rewrite slug …

    So in my case it works this way:
    custom post type – regulation – archive URL (all custom posts) example.com/regulation/
    post “amazing post” – URL – example.com/regulation/amazing-post/
    Custom taxonomy – country(category)
    Value – Austria – URL – example.com/country/austria/ (all posts under category/country Austria)

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Posts in taxonomy not showing like categories’ is closed to new replies.