Site logo

[Resolved] Trying to Understand Taxonomies

Home Forums Support [Resolved] Trying to Understand Taxonomies

Home Forums Support Trying to Understand Taxonomies

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #2455122
    gpstart

    I created a CPT called Brand.

    I created a few taxonomies for Brand.

    One of them is Retailer. Another is Location. Another is Gender.

    For several of the brands I created, the location is United States (url: united-states)
    If I got to /location/united-states/ I see a list of brands where I categorized location as United States.

    But, if I just go to /location/ I get an error page.

    Is that what is supposed to happen?

    Should I be able to create a template to display brands based on all locations? Is that the Brand Location Archive?

    So, further to this, would this also mean I could create pages for each taxonomy such as /retailer/ and /gender/. At the moment I get 404 pages.

    #2455253
    Fernando
    Customer Support

    Hello there,

    To clarify first, have you rebuilt your permalinks? You’ll need to do this every time you create a CPT or custom taxonomy so that it appears in the Frontend.

    With that said, can you go to Settings > Permalinks, and just hit save?

    Let us know how it goes if you haven’t done this.

    #2455273
    gpstart

    I’m pretty sure I did it. But, I saved it again.

    I still get 404 errors for /location/ and /gender/ and other taxonomies I have.

    But, if I narrow down and go to /location/united-states/, the template I have works. Same with gender. If I go to /gender/women/ or /gender/men/ then it displays normally.

    #2455305
    Fernando
    Customer Support

    I see. Can you provide admin login credentials so we can take a closer look at your structure?

    Please use the Private Information field for this: https://docs.generatepress.com/article/using-the-premium-support-forum/#private-information

    #2456105
    gpstart

    I’ll provide details later today.

    #2456198
    David
    Staff
    Customer Support

    Hi there,

    can you make sure when you registered the CPT, you set the has_archive parameter to true

    #2457174
    gpstart

    Yes, it was set to true.

    I’ve included login details too.

    #2457973
    David
    Staff
    Customer Support

    So what do you expect to show on eg. the /location archive – ALL of the Brand posts ? or just those with a Location tax term ?

    #2458191
    gpstart

    I assumed it would show all the brands just like if I were to just go to /brand/

    But, at the same time, if it just showed brands that were categorized with a location, I can understand that.

    I just want to know if what is happening is supposed to happen? It’s fine if that’s the way it is.

    If not, and /location is supposed to show something, I’d like to know why it’s not showing anything and what I’m doing incorrectly.

    #2458349
    Fernando
    Customer Support

    I see. That’s normal WordPress behavior.

    To put things into perspective, you have this WordPress category term page – https://yoursitename.com/category/european-apparel-sales-reps/ (I removed your site domain for privacy) – This isn’t a CPT but a WordPress default page.

    If you set it to just https://yoursitename.com/category/ it directs to a 404 page.

    This is the default behavior on taxonomies on any WordPress site. To answer your question, yes, what’s happening is supposed to happen, and your doing everything correctly. It’s just how WordPress permalink structure works by default.

    #2458363
    gpstart

    Ok, great. Thank you!

    #2458379
    Fernando
    Customer Support

    You’re welcome!

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.