Categories in Product Title and descriptions

#693823
  • Resolved Kosh Mart
    Rank Math free

    Hi,

    I have a product called The Starry Night Saint Remy and it has the categories Post-Expressionism, Vincent Van Gogh, Landscape

    Now I want the product title to be “The Starry Night Saint Remy” by “Vincent Van Gogh” how do I go about doing that without having to hardcode that, it needs to be a variable.

    Thanks,
    S.O

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

    Thank you for reaching out to us. To dynamically include the product categories in the product title, you can use the %wc_product_categories% variable. This will automatically display the categories of the product in the title.

    Here’s how you can do it:

    1. Go to your WordPress Dashboard.
    2. Navigate to Rank Math SEO > Titles & Meta > Products.
    3. In the “Single Product Title” field, you can use the %wc_product_categories% variable along with the product name to create a dynamic title that includes the categories.

    For example, you can use the following format:

    %wc_product_title% by %wc_product_categories%

    This will automatically display the product title followed by the categories, such as “The Starry Night Saint Remy by Post-Expressionism, Vincent Van Gogh, Landscape”.

    If you have any further questions or need assistance with anything else, feel free to ask.

    Variables available in single product title

    I hope this helps!

    Sources:
    Rank Math ‘Titles and Meta’ Options and Settings
    General Tab in Meta Box of Rank Math SEO Plugin
    Using Variables in the SEO Title and Description » Rank Math
    How to Use Product Schema for WooCommerce Products » Rank Math

    I only want one category to show, not all the categories.

    Hello,

    In that case, please use this variable instead: %customterm(product_cat)%

    Let us know if that works for you.

    Looking forward to helping you.

    How do I use product_cat?

    Hello,

    You can use the %customterm(product_cat)% variable as you would use any other Rank Math variable.

    The variable would display your category, if you have multiple, it would display the primary category.

    We hope this helps you resolve the issue. If you have any other questions or concerns regarding Rank Math, please feel free to contact us again. We are always happy to help.

    Thank you for choosing Rank Math!

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

The ticket ‘Categories in Product Title and descriptions’ is closed to new replies.