Use Attributes in Titles

#203133
  • Resolved Tihonshumoff
    Rank Math free

    Hi,

    I like to use the variables in the titles (%category% %title% %wc_brand%) but it it does not work with %my_attribute% where %my_attribute% is a attribute of woocommerce product/

    In one of the posts you suggested using the code:
    add_action( 'rank_math/vars/register_extra_replacements', function() {
    RankMath\Helper::register_var_replacement( 'variable_name',array('Callback_name'),$args} );

    But I can’t use it.

    Please help, I need to add the attribute value to the page title.

Viewing 3 replies - 1 through 3 (of 3 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.

    Have you already modified the code you have provided? This filter should be modified before using it on your site. Here’s a link on how you can apply the filter:
    https://rankmath.com/kb/filters-hooks-api-developer/

    You would need to register it on your site and add the necessary logic to get the value of the product attribute and display it when the custom variable is called.

    Unfortunately, we don’t offer code/filter customization given our small team. If you’re not a developer, you may need to hire a developer to assist you.

    As much as we would love to offer customized solutions to each and every user we have, it just isn’t possible for a small company like ours with limited resources.

    I hope that helps.

    Thank you, and please don’t hesitate to contact us anytime if you need further assistance with anything else.

    There are no inconveniences and no problems. You have developed a very decent plugin. I know that my question goes beyond the user experience, so I’m happy with any advice. If I don’t figure it out myself, I’ll follow your advice and hire a developer.

    Thanks.

    Anas
    Rank Math business

    Hello,

    If you do have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.

    Thank you.

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

The ticket ‘Use Attributes in Titles’ is closed to new replies.