WooCommerce product title misplacement in copied theme
-
Good day. I have used WP for a while here and there but I’m pretty much a noob. WP is 6.4.1.
The problem: In Twenty Twenty One 2.0 the product title appears within the product summary as it does in any other theme, but in copies of Twenty Twenty One it appears as the regular page titles as per template-parts/content/content-single.php
First let me say that the reason I’m not making a child theme is because I don’t want to have to keep up with whatever changes introduced by parent theme updates. I understand it’s a good thing to have them as a matter of adaptation to new WP versions and to protect against potential exploits. However I believe it’s also true that theme updates can break a child theme, and I can always simply turn off WP automatic updates and only update WP and adjust my theme willingly when a seriously dangerous exploit is known.
Come to think of it I could just turn off automatic updates for the parent theme and still use a child theme, but regardless I don’t think this problem should be happening, so I’d appreciate any help to understand what’s going on with this mystery.
What I have tried (to no avail):
*I have replaced all identifying strings in the theme accordingly. Set Text-domain to directory name. Directory name being lowercase itself and in Text-domain too. All other files have had “twentytwentyone” swapped by the new slug(?) too.
*I have made different copies and regardless of changing the aforementioned or not, they all exhibit the problem. This doesn’t occur in copies of Twenty Twenty Two, Three and Four.
*I have made sure I have no caching on WP. I just don’t have a cache folder in wp-content and no extra plugins for that purpose. My installed and enabled plugins are WC 8.2.2 and Theme Check 20230417, and my installed and disabled ones are: Akismet Anti-spam 5.3, Hello Dolly 1.7.2, Simply Show Hooks 1.2.1 and WP Mail Logging 1.12.0.
*I have deleted theme_mods_[theme name] entries for the copies in wp_options DB table. Basically I have searched the WP database for any of the theme copies slug string and checked if there could be some sort of strange caching going on.
*I have searched for WC related hooks in Twenty Twenty One and I don’t think there’s any. I suppose WC uses WP hooks too to change theme stuff, but I don’t see why there would be anything fundamentally different in a copied theme unless for an identifying string mismatch.
*I have checked and rechecked with different AI chatbots the issue inside out, but they can only help so much given that I don’t know exactly what to look for.
So here I am, completely out of ideas as to what may be going on. I’m considering just taking a vanilla kind of theme and move and adjust all my changes so far at this point, or perhaps just making a child of Twenty Twenty One, which does work. The reason I selected Twenty Twenty One is because I’m having a hard time understanding how block themes are customized. I know I can just drop blocks in the placeholders and things like that but somehow it’s not really clicking in me. What I really want to know at this point is WHY specifically is this behavior occurring. WHAT in Twenty Twenty One, WP or WC, makes it so that this title is misplaced ONLY in the theme copies but NOT in the original theme. I’m so intrigued and I can’t just let go.
Thank you for any hints.
- The topic ‘WooCommerce product title misplacement in copied theme’ is closed to new replies.