WordPress.org

Ready to get started?Download WordPress

Forums

Template Hierarchy dont working as supposed (11 posts)

  1. gabidavila
    Member
    Posted 3 years ago #

    I am having trouble the template Hierarchy, Codex tells the order is:

    • taxonomy-{slug}-{term}.php
    • taxonomy-{slug}.php
    • taxonomy.php
    • archive.php
    • index.php

    I created a custom taxonomy page called "tratamentos" and created the template files according to the taxonomy.

    But WordPress keeps giving me 404 error. I dont know what would be.

  2. 404 means there's nothing with that taxonomy in your blog. Are you using the short name or slug?

  3. gabidavila
    Member
    Posted 3 years ago #

    I dont think so. Because I created a page, called test, I was able to accesss with: http://mydomain.com/tratamentos/test, this page called single-tratamentos.php with success. But when I was on the #wordpress channel on IRC, was confimed that http://mydomain.com/tratamentos should call taxonomy-tratamentos.php or taxonomy.php. But it is not. So, I am accessing the taxonomy with the correct slug. But http://mydomain.com/tratamentos keeps showing 404 error, and http://mydomain.com/tratamentos/test is not.

  4. Brain fart.

    It's either http://domain.com/tag/tratamentos OR http://domain.com/category/tratamentos

    Depends on if it's a tag or a cat :)

  5. gabidavila
    Member
    Posted 3 years ago #

    Neither
    It is custom page taxonomy

  6. You mean a taxonomy for a custom page or ...?

    Regular custom taxonomies are just handled like tags, I thought.

  7. gabidavila
    Member
    Posted 3 years ago #

    Custom Page.

    I created a custom taxonomy page called "tratamentos" and created the template files according to the taxonomy.

  8. Yeah, I'm asking in a different way cause the terms can get confusing :) Bear with me please.

    Do you mean a custom taxonomy for a Custom Post Type?

  9. gabidavila
    Member
    Posted 3 years ago #

    Custom Post Type. I configured as a page type.

  10. Okay. Did you set tratamentos as hierarchical?

  11. gabidavila
    Member
    Posted 3 years ago #

    Yes I did, and for a short momment I changed to No hierarchical, and still nothing :/

Topic Closed

This topic has been closed to new replies.

About this Topic