• Resolved LuciferX

    (@laurent4671)


    Hello Rank Math Support Team,
    
    I need your help to add data provided for the "offers" element for each product on the product category pages of my WooCommerce website. I have tried several approaches, but none have been successful so far.
    
    The goal is to ensure that the correct provided data is present and properly formatted for Google Search to show rich snippets in search results.
    
    Approaches tried:
    
    I attempted to create a custom function to modify the JSON-LD data created by Rank Math. I added the function to the 'rank_math/snippet/rich_snippet_product_entity' filter, but the data was not added as expected. I also tried using the 'rank_math/json_ld' filter, but that didn't work either.
    
    I tried to create another custom function to insert the "deals" defined data into a new JSON-LD script, separate from the one generated by Rank Math. I added this function to the 'wp_footer' action, but this approach did not produce the desired results either.
    
    I tried using the 'rank_math/snippet/rich_snippet' filter to add the "offers" element, but that also didn't yield the desired results.
    
    I experimented with different priorities when adding the filters, but none of the priorities seemed to make a difference.
    
    Finally, I tried using JavaScript to insert the "offers" defined data directly into the HTML of the product category pages. I created a separate JavaScript file, queued it on the product category pages, and used jQuery to track the product from the page and add the provided data. Unfortunately, that approach didn't work either.
    
    Anyway, I'm a bit dry…
    
    Thank you for your time and your help.
    
    Sincerely,

    • This topic was modified 1 year, 11 months ago by LuciferX.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Need help with adding structured data for “offers” on product category pages’ is closed to new replies.