Making default rule for product meta description doesn’t work.

#1079437
Viewing 6 replies - 1 through 6 (of 6 total)
  • Hello,

    We apologize for the issue you are facing with setting the default rule for your product meta description. It seems like there might be a misunderstanding in how to implement the code correctly. When code appears on the front end, it usually indicates that it is not being executed properly, which can happen if it’s placed in the wrong file or if there are syntax errors.

    To set a default meta description for all products, you might want to consider using the Rank Math settings directly instead of modifying the plugin files. Here’s a general approach:

    1. Go to Rank Math > Titles & Meta in your WordPress dashboard.
    2. Select the Products tab and set a default meta description template using variables like %product_title% or any other relevant data.
    3. Save Changes to apply the new settings.

    If you still prefer to use custom code, please ensure that you are adding it in a way that it does not interfere with the plugin’s functionality. You might want to check if you are using a child theme or a custom plugin to add your code, as this is generally recommended to avoid issues with updates.

    If the problem persists, please reply to this ticket with your site URL so that a human agent from our support team can assist you further. Thank you for raising this concern!

    Sources:
    Why Your SEO Title, Description & Focus Keyword Aren’t Being Saved » Rank Math
    Why Your SEO Title, Description & Focus Keyword Aren’t Being Saved » Rank Math

    Frank Shankly
    Rank Math free

    I still need help.
    This is my website’s URL.

    https://www.catchopcd.net/

    Herry Brook
    Rank Math free

    It looks like you’re placing the code directly in rank-math.php, which isn’t recommended. Customizations like default meta rules should be added via a custom plugin or your theme’s functions.php file. Placing code in core plugin files can cause issues and will be overwritten on updates. Try moving the logic to a safer place and test again.

    Frank Shankly
    Rank Math free

    Hello. Thank you for your comment.
    I just added the code using both code snippets plugin and theme’s functions.php file.
    As you may know, this is to use custom Single Product Description as default meta description rule.
    But still it doesn’t overwrite short description which has the highest priority for meta description.
    Is there anything else I can try?
    Thank you.

    Frank Shankly
    Rank Math free

    Now it works.
    Looks like I had to wait for a while till the code replaces meta descriptions with custom tags.

    Hello,

    Glad that everything has been sorted out.

    Please feel free to reach out to us again in case you need any other assistance.

    We are here to help.

    Thank you.

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

You must be logged in to reply to this ticket.