• This is a custom theme I’ve been charged with making functional. I got it stable, but now I need to update all the plugins and this is causing new problems. On my stable version of this link, the engine correctly calls taxonomy-product_cat.php, as seen here: https://archways-ceilings.websitepro.hosting/product-category/ceiling-kits/, but on the version with updates installed it’s calling page.php.

    Is there a simple fix I can make to force the wordpress engine to call the right template? Digging into the DB to fix problems is a bit beyond my skillset with wordpress, so ideally there could be some tweak to the wp-admin or even the template pages themselves to ensure that the right template is called each time.

    Many thanks–

    David

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • WordPress is doing it like it always has, unless you have discovered a new bug. But this is the first I’ve heard of it and there are a lot of sites out there with template files like that, so I doubt it is a bug.
    What could be happening is a plugin (or theme) is affecting which template file is loaded.
    It doesn’t look quite right that your file is taxonomy-product_cat.php and the URL has product-category. The plugin that is defining the custom taxonomy could have a bug in an update.

    It’s not in the database. Registration of post types and taxonomies happens for each page request.

    You can see the code to call the right template here:
    https://core.trac.www.ads-software.com/browser/tags/5.2/src/wp-includes/template-loader.php

    Note that there is an action at the beginning template_redirect
    and a filter near the end template_include.

    Thread Starter ddemoss

    (@ddemoss)

    Thanks for the reply, joy.

    I have attached screenshots in this google photos album to demonstrate what I am referring to.

    https://photos.google.com/album/AF1QipN0fozcRdOLNGyuLDeuB0bBCS1g6tsKurnCho4I

    The information from the screenshots shows, via query monitor, that one site is using page.php and the other is properly using taxonomy-product_cat.php. I have made no changes to the backend of the sites, other than the problem site has been updated.

    Does this provide you with any further insight into this problem?

    No, especially since I can’t see your screenshot.
    You can try using the Health Check plugin in Troubleshoot mode to isolate what is different. It allows you to disable plugins and themes for your user only, without affecting your site visitors.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘WordPress calls page.php instead of taxonomy-product_cat.php after update’ is closed to new replies.