Product price in title and description

#334215
  • Resolved Dzohn Paterson
    Rank Math free

    Hi, i have some problem. In Rank math – title and description – Product, i add in description %wc_price%, but on product edit page in setting not showing.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Hello,

    Thank you for contacting Rank Math and bringing your concern to our attention. I’m sorry for any inconvenience this issue may have caused you.

    Could you please share the affected URL so we can check?

    Meanwhile, please save/update the product first as the %wc_price% variable fetches the saved price of your products.

    Looking forward to helping you.

    Thank you.

    Yep i update product, but it doesnt help me
    Product

    Hello,

    We might need to take a closer look at the settings. Please edit the first post on this ticket and include your WordPress login 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.

    Hello,

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

    Thank you.

    Prabhat
    Rank Math agency

    Hello,

    I logged into your website’s admin area and found that you added the %wc_price% variable in the global settings under Titles & Meta > Products > Single Product Description.

    The global settings are applied only to new posts/pages/products only and the posts/pages/products whose data is not modified from the SEO Meta box. However, you can easily use the SEO Meta box to modify the SEO title/description of old products.

    Please have a look at the screencast in the sensitive data section of this ticket.

    I also tested in a new product and the global settings are applied correctly.

    Hope this helps.

    Thank you.

    So i need manually update all 1500 products?

    Prabhat
    Rank Math agency

    Hello,

    If you do not wish to update the products manually and if you wish to apply the global settings to all the products, then you can add the below filter to the website:

    add_action( 'rank_math/frontend/description', function( $description ) {
        global $post;
        $desc = RankMath\Helper::get_settings( "titles.pt_product_description" );	 
        if ( $desc ) {
            return RankMath\Helper::replace_vars( $desc, $post );
        }
        return $description;
    });

    Please note that this code will apply the global description to all the products (new or existing).

    You can follow this guide to add the code:
    https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Hope this helps.

    Thank you.

    as I understand, after activating, it will replace everywhere with the desired values. After that I can delete it? Or then I will lose the replacement values?

    Also a second question, will it replace the values if I use wpml for 2 other product languages?

    Prabhat
    Rank Math agency

    Hello,

    The code would update the meta description on runtime and would not modify the database. Hence, unless you want to apply custom meta descriptions on individual products, you’ll need to leave the code on the website.

    Also a second question, will it replace the values if I use wpml for 2 other product languages?

    The code will apply the global meta description settings to all the product pages.

    Hope this helps.

    Thank 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 9 replies - 1 through 9 (of 9 total)

The ticket ‘Product price in title and description’ is closed to new replies.