Viewing 14 replies - 1 through 14 (of 14 total)
  • Thread Starter raha1988ab

    (@raha1988ab)

    I mean , want to add attributes in here that I can contorl theme or any way to put the seo control for each attributes

    https://prnt.sc/MRk7rH6vYLao

    Plugin Support Rank Math Support

    (@rankmathteam)

    Hello @raha1988ab,

    Thank you for reaching out to us and bringing your concern to our attention.

    Our SEO controls will only work for pages or posts that are registered in the database.

    The filter pages are dynamically generated and we cannot assign the SEO settings there so your only option for now is the use of our filter code.

    The filter code from the thread you shared doesn’t add the SEO controls, it will only allow you to modify the meta title and description for the frontend. Here, we have changed the code a bit to match the query parameter from your website:
    add_filter('rank_math/frontend/title', function ($title) { if (!isset($_GET['filter'])) { return $title; } return 'Custom Title'; }); add_filter('rank_math/frontend/description', function ($description) { if (!isset($_GET['filter'])) { return $description; } return 'Custom Description'; });

    You can only add the SEO controls to the attributes that have archives enabled for them. If the archives are not enabled, the attributes will not show in the front end and that’s why there is no point in adding the metadata to them.

    Please edit the attributes and enable archives to add them in the Titles & Meta settings and enable the SEO controls for them. Here is a screenshot for your reference: https://i.rankmath.com/i/EfepMJ

    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

    Thread Starter raha1988ab

    (@raha1988ab)

    Plugin Support Rank Math Support

    (@rankmathteam)

    Hello @raha1988ab,

    The filter code will not update the title and description meta on the SEO editor or in your backend. The filter works on the fly when you load the page’s front end.

    Please try checking the live page here instead: https://rankmath.com/tools/meta-tag-analyzer/

    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

    Thread Starter raha1988ab

    (@raha1988ab)

    Hi @rankmathteam

    Thanks for that information

    Is it possible to add SEO CONTROL for thoes attributes?

    it is important to me , are you going any option to add that in Rankmath ?

    Please describe me that.

    Plugin Support Rank Math Support

    (@rankmathteam)

    Hello @raha1988ab,

    The option can’t be added to the attributes without archives as they don’t show up in the front end. The pages you are seeing for them are generated using filters dynamically and since those pages are not editable in the back end, we also can’t add SEO controls to that.

    And even if we add the SEO controls to the attribute pages, they will be applied only to the actual attribute page, not to the filter page generated using them.

    Hope this clarifies your doubts. Please don’t hesitate to get in touch in case you need our assistance with anything else.

    Thread Starter raha1988ab

    (@raha1988ab)

    Hi

    okey , but the code you gave me wont work , how did you test it? colud you please show me how it worked for you?

    Plugin Support Rank Math Support

    (@rankmathteam)

    Hello @raha1988ab,

    We have tried from our end and it seems to have worked as you can see in this screenshot: https://i.rankmath.com/i/ykqdO9

    Can you please clear your website cache and check again? We recommend try checking here: https://rankmath.com/tools/meta-tag-analyzer/

    Let us know how that goes. Thank you.

    Thread Starter raha1988ab

    (@raha1988ab)

    Hi

    Please cheek this https://www.ads-software.com/support/topic/how-to-add-title-and-description-for-product-attributes-in-woocommerce/

    Woocommerce team help me in sample code for that , I want to extend the functionality of that

    If you add in rankmath , it would be wonderful.

    Plugin Support Rank Math Support

    (@rankmathteam)

    Hello @raha1988ab,

    The sample code provided in that ticket you shared is only related to the sitemap and it’s used to add custom links such as the filters to the sitemap. We also have a tutorial on how to create such custom sitemaps here: https://rankmath.com/kb/custom-sitemaps/

    As for the SEO controls, as we mentioned that is not possible to add to these pages but you can use the filter shared in one of the previous replies to add the custom title and description to those pages.

    Don’t hesitate to get in touch if you have any other questions.

    Thread Starter raha1988ab

    (@raha1988ab)

    Hello @rankmathteam

    Thanks for support and reply

    I test it with that code , even with storefront theme , but it wont work at all , also I cleard cash

    Maybe we are doing diffrent !

    if it possible please show me with short video or images or give me document

    Thanks a loot.

    Plugin Support Rank Math Support

    (@rankmathteam)

    Hello @raha1988ab,

    Please refer to this video screencast demonstrating the filter code: https://i.rankmath.com/v/90MztG

    If it still doesn’t work on your end, please make sure that you have applied the filter correctly. You may refer to this guide on how to add filters to your website: https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

    Thread Starter raha1988ab

    (@raha1988ab)

    Hi

    add_filter('rank_math/frontend/title', function ($title) { if (!isset($_GET['filter'])) { return $title; } return 'Custom Title'; }); add_filter('rank_math/frontend/description', function ($description) { if (!isset($_GET['filter'])) { return $description; } return 'Custom Description'; });
    
    

    That code is working but it show me the Custom Title

    I want to php Handel this dynamically not showing that title

    Plugin Support Rank Math Support

    (@rankmathteam)

    Hello @raha1988ab,

    Instead of using Custom Title and Custom Description, you will have to modify the filter to return the title and description you want. If you want to add those values dynamically then you will have to modify the filter further to get the values from the fields you want.

    That kind of modification falls out of the scope of our support. If you’re not sure, you can hire a professional developer to help you make changes to the filter.

    Please do not hesitate to let us know if you need our assistance with anything else.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘“seo controls” title and description for product attributes’ is closed to new replies.