Duplicate title in product categories (woocommerce)

#709688
Viewing 10 replies - 1 through 10 (of 10 total)
  • Hello,

    I apologize for the inconvenience you’re facing with the duplicate titles in your product categories. To customize the titles of your product categories to include the make, model, and part name, you can navigate to Rank Math SEO → Titles & Meta → Categories. From there, you can customize the category titles using variables to include the make, model, and part name.

    You can use the following variables to create a relevant category heading:

    • %customterm(product_cat)%: This variable will display the product category name.
    • %customterm(make)%: This variable will display the make of the product.
    • %customterm(model)%: This variable will display the model of the product.

    By combining these variables, you can create a relevant category title that includes the make, model, and part name.

    If you need further assistance with this, please feel free to reach out. Thank you for bringing this to our attention.

    Sources:
    How to Disable Custom Product Redirection in Rank Math » Rank Math
    How to Optimize a Category Page » Rank Math
    Rank Math ‘Titles and Meta’ Options and Settings
    Rank Math General Settings

    Anonymous
    Rank Math free

    If i use this template for category title:
    All parts in category: %customterm(pa_model)% %customterm(pa_make)% %customterm(product_cat)%
    I get title like – AC Compressor AC Compressor AC Compressor.

    This doesn’t help me.

    Hello,

    Could you please confirm if you have checked the categories title (page’s source code) instead of the sample in Titles & Meta Settings?

    If they are still not showing on the frontend, then we might need to take a closer look at the settings. Please edit the first post on this ticket and include your WordPress & FTP logins in the designated Sensitive Data section.

    Please do take a complete backup of your website before sharing the information with us.

    Sensitive Data Section

    It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:

    https://wordpress.org/plugins/temporary-login-without-password/

    You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):

    https://wordpress.org/plugins/wp-security-audit-log/

    We really look forward to helping you.

    Anonymous
    Rank Math free

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Anonymous
    Rank Math free

    Added link to login. Thx

    Hello,

    We have added the below code to your site using the the code snippets plugin.

    add_action('rank_math/vars/register_extra_replacements', function () {
        rank_math_register_var_replacement(
            'wc_parent_cats',
            [
                'name'        => esc_html__('WooCommerce Parent Categories', 'rank-math'),
                'description' => esc_html__('Displays a chain of parent categories for the current WooCommerce category.', 'rank-math'),
                'variable'    => 'wc_parent_cats',
                'example'     => wc_parent_cats_callback(),
            ],
            'wc_parent_cats_callback'
        );
    });
    
    function wc_parent_cats_callback() {
        // Check if we are on a product category page
        if (!is_product_category()) {
            return '';
        }
    
        $category = get_queried_object();
        $parents = get_ancestors($category->term_id, 'product_cat');
        $parents = array_reverse($parents); // Reverse the array to get the correct order
        $parent_cats = array();
    
        foreach ($parents as $parent) {
            $parent_cat = get_term($parent, 'product_cat');
            if ($parent_cat) {
                $parent_cats[] = $parent_cat->name;
            }
        }
    
        $parent_cats[] = $category->name; // Add the current category
    
        return implode(' - ', $parent_cats); // Separate categories with a dash
    }

    Then we changed the Product Category Archive Meta Title to %wc_parent_cats%

    Now the desired out come is being out putted in the archive meta title :
    https://usa.parts/product-category/porsche/porsche-cayenne/ac-compressor-porsche-cayenne/

    Please refer to the screenshot below :
    https://monosnap.com/direct/7JzSB6ZU1IBDaLaSZSqkwEL9fqEZT6

    We hope that helps, and please don’t hesitate to get in touch if you have any other questions.

    Thank you.

    Anonymous
    Rank Math free

    Many thanks for the help.
    Do I understand correctly that my problem could not be solved by simple module settings in the web interface?
    After all, duplication of tags in wooCommerce is not only a problem for me, but also for other users?

    Hello,

    While the specific options you’re looking for may not be readily available in Rank Math, the plugin’s versatility allows for custom coding and modifications through hooks and filters.

    This feature enables you to extend its capabilities and achieve the desired settings through coding.

    This flexibility is a significant aspect of what makes Rank Math a powerful tool for SEO.

    Could you please confirm that the desired setting is now working for you after the code implementation or do you still need assistantance on this ticket.

    We hope that helps, and please don’t hesitate to get in touch if you have any other questions.

    Thank you.

    Anonymous
    Rank Math free

    Thx.
    I have one more question.
    Where is the sub-categories on the sidebar?
    Here i have them https://usa.parts/product-category/bmw/bmw-430i-2013-2017/
    And on the next step:
    https://usa.parts/product-category/bmw/bmw-430i-2013-2017/heater-blend-door-actuator-bmw-430i-2013-2017/
    I didn’t have them.

    screenshot

    Hello,

    Thank you for your patience.

    The categories panel on the left side is controlled by your theme.

    In this case, you may get in touch with your theme provider to help you organize the categories appearing when viewing a single category.

    Looking forward to helping you.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 10 replies - 1 through 10 (of 10 total)

The ticket ‘Duplicate title in product categories (woocommerce)’ is closed to new replies.