Apostrophes different on product single and product archive

This topic has 8 replies, 2 voices, and was last updated 4 months ago ago by Jack Richardson

  • Avatar: kikjou
    Martin
    Participant
    August 3, 2025 at 16:13

    Hello,

    I need to come back to the last topic (already closed) https://www.8theme.com/topic/handling-of-apostrophe-different-on-product-single-and-product-archive/#post-451545

    The problem was that apostrophes (in the product name) display differently on the product archive than on the single product page.

    It seems that the format of the apostrophes does not depend on the font. I have changed the font to Verdana (as you recommended), but the issue persists (see screenshots).

    I need both upper apostrophes (like on the single product page, but ideally straight [‘] and not [`´]). The version on the product archive is wrong [,´]

    Thank you
    Martin

    Please, contact administrator
    for this information.
    Files is visible for topic creator and
    support staff only.
    7 Answers
    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    August 4, 2025 at 08:56

    Dear @Martin,

    Thank you for providing access. However, the access level granted does not include administrator privileges, which prevents us from reviewing the product configuration in full detail.

    Based on our observations, it appears that the apostrophes in question were entered manually and will need to be corrected manually for each affected product. For instance, the product title "Achillea clypeolata ‚Anthea‘" should be updated in the product editor to the following format: "Achillea clypeolata 'Anthea'"

    Please note that this issue is neither related to typography settings nor to our theme code and cannot be resolved through CSS styling.

    Should you require any further assistance, please do not hesitate to contact us.

    Best regards,
    Jack Richardson
    The 8Theme Team

    Avatar: kikjou
    Martin
    Participant
    August 4, 2025 at 09:03

    Hello,

    right, sorry, I have changed the access level to admin now.

    The apostrophes are entered in that way (see screenshot).
    https://www.pflanzkompass.at/artikel/achillea-clypeolata-anthea/

    Since there is only 1 text field for the product title and the product title is displayed differently on those 2 templates, there must be a difference in how it is processed.

    Best regards
    Martin

    Files is visible for topic creator and
    support staff only.
    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    August 4, 2025 at 09:56

    Hello @Martin,

    We hope this message finds you well.

    Following a thorough investigation into the issue you reported regarding the incorrect display of apostrophes, we have identified that the problem is caused by a filter being applied to all post titles. This filter appears to originate from one or more plugins currently installed on your website, or potentially from specific server configurations.

    We have carefully reviewed the filters used within our theme’s and plugin’s code and can confirm that none of them are responsible for this behavior. Therefore, it is highly likely that the issue is being introduced externally.

    To address this, we have added the following code to the xstore-child/woocommerce/content-product.php file as the same top of the file. This code removes the conflicting filters, and as a result, the apostrophes are now displaying correctly (https://prnt.sc/n0lB7GEaoctp). You are welcome to verify this on your website:

    global $wp_filter;
    $summary_actions = $wp_filter['the_title'];
    $actions_2_remove = array();
    
    if ( ! empty( $summary_actions ) && isset( $summary_actions ) ) {
        foreach ( $summary_actions as $item_priority => $item_value ) {
            foreach ( $item_value as $action => $args ) {
                if ( strpos( $action, 'capital_P_dangit' ) === false ) {
                    $actions_2_remove[] = array(
                        'name'     => $action,
                        'priority' => $item_priority
                    );
                }
            }
        }
    
        foreach ( $actions_2_remove as $action ) {
            remove_action( 'the_title', $action['name'], $action['priority'] );
        }
    }

    We copied the file to your child-theme (so you won’t lose the changes after theme update).

    Don’t forget to clear all the caches before checking (if you have CDN please, clear it’s cache too).

    Please let us know if you have any further questions or if we can assist you with anything else.

    Best regards,
    The 8Theme Team

    Avatar: kikjou
    Martin
    Participant
    August 8, 2025 at 07:46

    Hello,

    thank you!

    I have created a staging site, step by step deactivated all plugins except elementor, and removed the code that you gave me. The apostrophes remain wrong, unless your code is put back. I have also temporarily removed all entries from functions.php and additional css.
    You can have a look yourself, the credentials for the staging are attached.
    Please consider the possibility, that it is not due to third-party code.

    Besides, I have found another issue with the product title. Titles longer than about 32 characters are not broken into a new line, but have the overflow hidden. (screenshot attachted).
    This issue also did not resolve after deactivation of all plugins and code.

    Thank you
    Best regards
    Martin

    Please contact administrator
    for this information.
    Files is visible for topic creator and
    support staff only.
    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    August 8, 2025 at 08:39

    Hello @Martin,

    I hope this message finds you well.

    We would like to inform you that your staging website is currently experiencing a fatal error, which is preventing us from accessing the dashboard.

    Additionally, could you kindly confirm whether the issue has been resolved on your live web-site after implementing our provided code snippet?

    Regarding the title display, if you wish to limit it to a few lines, you can configure the “Title Limitation Type” option by selecting “Chars Limitation” and setting the value to “0”.

    Please let us know if you need any further assistance.

    Best regards,
    The 8Theme Team

    Avatar: kikjou
    Martin
    Participant
    August 8, 2025 at 09:50

    Hello Jack,

    true, the staging needs to be fixed. That could take a little, sorry for that.

    In the meanwhile, yes, your code solved the problem with the apostrophes.

    Regarding the titles, no, I do not want to limit their display length, I need them to display completely, breaking over 2 lines.

    Thanks a lot, best regards
    Martin

    Files is visible for topic creator and
    support staff only.
    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    August 8, 2025 at 10:14

    Hello @Martin,

    We hope this message finds you well.

    If you set the value to “0”, the titles will not be cropped. This is the solution we previously recommended in order to display the titles in full. We kindly suggest that you perform a test to verify the results.

    Should you require any further assistance, please provide a detailed description of the issue and include the website on which you would like the fix to be implemented.

    Best regards,
    The 8Theme Team

  • Viewing 8 results - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.