• Resolved ecv80

    (@ecv80)


    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.

    • This topic was modified 10 months, 4 weeks ago by ecv80.
Viewing 7 replies - 1 through 7 (of 7 total)
  • I’m a bit confused. What do you mean by “theme copy”? Do you mean a child theme? But you don’t actually want to create that at the moment, do you?

    Thread Starter ecv80

    (@ecv80)

    i mean a copy of folder twentytwentyone with a different name. Also setting style.css Text Domain and Theme Name to this, although the issue happens regardless of this.

    Why do you copy a theme in this form? In this case, you can hardly get support because you don’t know what else has been customised. Child themes are there for customising a theme. Why don’t you use them?

    Thread Starter ecv80

    (@ecv80)

    Thanks @threadi Okay, I understand and I will most definitely use child themes from now on, considering all the gratuitous weirdness and struggle I’ve had with this (wrong) approach.

    The reason I’ve done it by copying simply put is down to ignorance and because I would expect it to work because after all a new theme that depends on no other theme is supposed to work. It makes sense to me copying would work just fine unless something in WP or WC is specifically treating the original theme in a special way like it will not treat its copies.

    At this point I’m not really interested in making the copy work anymore but just figuring out the source of the problem for the sake of understanding. If you or anybody else can shed light onto this I’d appreciate.

    Thread Starter ecv80

    (@ecv80)

    Any conjecture is welcome. Maybe I don’t understand well enough how new (parent) themes are created and some sort of customization from WP and WC to accommodate the new theme is to be expected.

    The use of child themes is described in detail here: https://developer.www.ads-software.com/themes/advanced-topics/child-themes/

    If you want to customise individual aspects of WooCommerce, you can either overlay their templates using a child theme or use their hooks. The latter is documented by Woo here: https://woo.com/document/introduction-to-hooks-actions-and-filters/

    Thread Starter ecv80

    (@ecv80)

    Thank you for all the documentation. This doesn’t really address the matter of figuring out where the source of the problem lies (other than misuse which was already an established premise). Although I generally dislike giving up on matters of curiosity, I take it this road is not a worthy enough learning experience due to its presumed limited applicability in future circumstances. And indeed this could set me up against receiving support in future more pushing, less capricious matters, so I’m moving on to more pragmatic grounds.

    Thank you for all the support.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘WooCommerce product title misplacement in copied theme’ is closed to new replies.