• Dear WordPressers,

    I am getting a little discouraged on this topic as I have been browsing this forum thoroughly and don’t seem to find the right answer. Any help is appreciated.

    I have made custom taxonomies with this custom-taxonomies in wordpress tutorial.

    Now as Justin says you’d have to be able to visit a taxonomy archive and set up a template for this.
    I can setup a template for taxonomy-people-justin-tadlock.php, but nor for taxonomy-people.php .
    When I visit this url wordpress/people/ I get a 404 error although I do have a template for this.
    Please help me out with this…
    Custom taxonomies sound great but they are kind of driving me mad.

    xLauren

Viewing 15 replies - 1 through 15 (of 15 total)
  • Thread Starter lola rennt

    (@laurenserge)

    Thanks for your help Michael!
    Somehow I think this is just a little bit too complicated for what I am trying to do.
    Isn’t the taxonomy-tax.php already included in the WP structure? For me it should work like category.php works… or tag.php. But maybe I am missing sth here?

    Thread Starter lola rennt

    (@laurenserge)

    Yes, well I was aware of this… and that’s why I don’t understand.
    Wordpress can call this taxonomy-{taxonomy}-{term}.php template of mine with success but not this taxonomy-{taxonomy}.php template. Then I get a 404 error…

    This works https://wordpress/location/sint-niklaas/
    but nor this https://wordpress/location/

    Maybe my code on that page is not right? I just copied the page.php template for this template. Is there some reference somewhere on how to build this exact template?

    The /location page doesn’t exist because WordPress doesn’t just make a page based off your URL structure. You can create a “Page” called “location” if you need to show content there.

    taxonomy-people.php is the default template for term archives within the people taxonomy. taxonomy-people-justin-tadlock.php is the archive template for one specific term.

    Thread Starter lola rennt

    (@laurenserge)

    Okay now I finally understand why it wasn’t working. I expected the taxonomy-people.php to be rendered when someone visits https://wordpres/people/ – but it isn’t meant for that. taxonomy-people.php is the template for a term within the people taxonomy – not the taxonomy itself.

    I’ve now made a custom _get variable containing the taxonomy name – I can then get all the terms that belong to that taxonomy and loop through them to render a list of posts that have a tag that belongs to that taxonomy.

    I still wonder if there isn’t a standard way to do this – but my hack works : )

    Thanks!

    Yeah, how stupid that /location/ just 404’s on you, where do I start? We shouldn’t need to create a seperate page, just to cover up something! ?? In February, there was a discussion that I started on this very topic which got 75+ replies, so it struck nerve somewhere … just look and see how many people agree that something needs to be altered! ??

    That’s not to mention all the people I talked to on Twitter, and various other places who agreed with what I and others were saying on the matter!

    Hi laurenserge, I have a similar problem. Everytime I click a term in my taxonomy cloud it goes to a 404 error page. How did you fix this problem?

    Thread Starter lola rennt

    (@laurenserge)

    Hi magaworks,
    the 404 problem could be solved by updating your permalinks – at least that’s what worked for me.
    Here you see how you can update them. I chose to set them in archive mode – month and name – and that worked perfectly!

    You don’t have to update your permalinks. You merely need to visit the Permalinks settings page because it flushes your rewrite rules.

    thanks. Solved ??

    You merely need to visit the Permalinks settings page because it flushes your rewrite rules.

    I spent at least two hours smashing my head because my archives broke whenever I tried to add a new custom taxonomy. I never would have thought to try something so simple. Problem solved. Thanks.

    Hi laurenserge,

    I have the exact same problem. I found out that in fact, WP may in fact be looking for a category with the name of your taxonomy, hence the 404 since it doesn’t exist.

    Can you post an example of your custom _get request please ?

    Thanks

    Sebastien

    @greenshady Thanks! it worked for me too. I Just opened the permalink setting page and clicked “save changes” (without actually changing anything) and it worked! ??

    Also remember that if your custom taxonomy term is empty (ie: no posts or pages are using that term), some themes (ie: TwentyTen) show what looks like an Error 404 page (it’s not really). So if you’re testing custom taxonomy “category” pages, make sure you actually have some posts that belong to that term.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘How to visit a taxonomy archive’ is closed to new replies.