• Resolved shawfactor

    (@shawfactor)


    I have several custom taxonomies that are shared between products and other post types. get_template_loader_default_file overrides the template on all of these to archive-product.php including on non product post_type archives.

    This is incorrect. the logic should only override the template on woocommerce post type archives likes products.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter shawfactor

    (@shawfactor)

    Woocommerce also seems to override the order of the the posts on these non product archives as well (where the taxonomy is shared with products)

    This is extremely frustrating

    Thread Starter shawfactor

    (@shawfactor)

    e.g. I have a taxonomy called seasons that is shared between posts, pages, products, and events called “winter-2022”. When I go to mysite.com/season/winter-2022/ it uses the archive-product.php template. Even though the post type being queried is a post. The same applies to events etc.

    Hi there @shawfactor

    I have several custom taxonomies that are shared between products and other post types. get_template_loader_default_file overrides the template on all of these to archive-product.php including on non product post_type archives.

    Thank you for reaching out. From what I gather, you are developing custom functionality, around get_template_loader_default_file (documentation linked here).

    This is a fairly complex development topic. I’m going to leave it open for a bit to see if anyone is able to chime in to help you out.

    Kindly keep in mind, we are not developers and only offer support for existing functionality.

    Please see our Support Policy: https://www.woocommerce.com/support-policy/

    For assistance with customization or development with your site, we recommend that you seek help from:

    If you are comfortable coding yourself and have questions, I would also recommend that you consider:

    I hope that helps you to figure it out.

    Feel free to get back to us if you have further questions.

    Thread Starter shawfactor

    (@shawfactor)

    given woocommerce is the plugin overriding the template in this circumstance (when it here is no logical reason why it should) this should be considered a bug and your developers should fix it.

    Hi @shawfactor

    If you think that this is a bug, you could raise your concern to the proper channel here: https://github.com/woocommerce/woocommerce/issues/new/choose

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘get_template_loader_default_file is overzealous overriding templates’ is closed to new replies.