Hello,
Thank you for contacting us and sorry for any inconvenience that might have been caused due to that.
Can you please confirm if you’re using any custom blocks on your website to add the content to your page? If so, it may require you to apply our API as currently, we are not able to access the content generated by custom blocks: https://rankmath.com/kb/content-analysis-api/
Let us know how it goes. Looking forward to helping you.
For information, I use elementor CroCoblock
Hello,
We suggest checking with their development team instead as they are in the best position to help you integrate our Content Analysis API into their plugin/theme.
Don’t hesitate to get in touch with us if you have any other questions.
Hello,
You do not answer my question
I didn’t understand very well
I have to add this js file only
wp-enqueue-script( 'rank-math-integration', DIR . '/js/rank-math-integration.js', 'wp-hooks', 'rank-math-analyzer’, false, true );
or this one too
wp.hooks.addFilter( 'rank_math_title', 'plugin-name', callback_function_to_fetch_title ) // This will hook into title analysis data.
wp.hooks.addFilter( 'rank_math_content', 'rank-math', this.getContent ) // This will hook into content analysis data.
or the one found on this link
https://github.com/rankmath/seo-by-rank-math/blob/master/assets/admin/src/custom-fields.js
Thanks for your help.
Hello,
You need to add a JS file that will handle the integration of the data into the Content Analysis API. The first piece of code you shared is used to enqueue the file and the second piece of code is an example code that would go inside the file.
Please note that just adding the file won’t make any difference. You need to perform the changes in the JS file and fetch the data to pass to the Content Analysis API.
The last file you shared is one example of our plugin does it to include support for custom fields and you can use that as a starting point but to integrate with your current setup you need to perform further changes and customize the JS code.
Don’t hesitate to get in touch if you have any other questions.
Thank you for your explanations
In my case I have posts that are managed via Jet Engine
And it is a Template managed by Elementor that displays these Posts.
Can you tell me how to modify the script in my case.
Thank you for your help.
Hello,
Custom code implementations are outside the scope of our support.
To integrate all that data you would need to consult with an experienced developer that could create a custom implementation of the API for your specific use case.
Don’t hesitate to get in touch if you have any other questions.
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.