- This topic has 11 replies, 3 voices, and was last updated 3 years, 4 months ago by
Fernando.
-
AuthorPosts
-
December 8, 2022 at 2:20 pm #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.
December 8, 2022 at 5:21 pm #2455253Fernando 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.
December 8, 2022 at 6:03 pm #2455273gpstart
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.
December 8, 2022 at 6:45 pm #2455305Fernando 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
December 9, 2022 at 7:52 am #2456105gpstart
I’ll provide details later today.
December 9, 2022 at 9:14 am #2456198David
StaffCustomer SupportHi there,
can you make sure when you registered the CPT, you set the
has_archiveparameter totrueDecember 10, 2022 at 8:36 am #2457174gpstart
Yes, it was set to true.
I’ve included login details too.
December 11, 2022 at 8:20 am #2457973David
StaffCustomer SupportSo what do you expect to show on eg. the
/locationarchive – ALL of the Brand posts ? or just those with a Location tax term ?December 11, 2022 at 12:42 pm #2458191gpstart
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.
December 11, 2022 at 5:41 pm #2458349Fernando 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.
December 11, 2022 at 6:33 pm #2458363gpstart
Ok, great. Thank you!
December 11, 2022 at 7:10 pm #2458379Fernando Customer Support
You’re welcome!
-
AuthorPosts
- You must be logged in to reply to this topic.