-
Good afternoon,
I’m a developer currently using Rank Math for a client.
In our project, we are using Gutenberg dynamic blocks to inject content from a selected custom post type. The final documentation page is composed of several dynamic blocks, each one injecting content from different post types.
My question is: is there a JavaScript/PHP function or filter that I can use to pass the dynamic content and update the page SEO score/calculation in the sidebar? Currently, the Rank Math score in the sidebar does not account for this dynamic content.
Abstractly, the front-end code in php looks something like this:
// injects some content related to post-id content// injects some content related to post-id content… and so on
In the editor, the block content preview is fetched this way:
const currentRelatedPost = useSelect((select) =>
select(“core”).getEntityRecord(“postType”, “questions”, relatedPostId),
);
// and then
<RawHTML>{currentRelatedPost.content.rendered}</RawHTML>Thank you for your assistance.
Best regards, Antoine
The ticket ‘Dynamic Gutenberg block | “Refreshing” the page score with dynamic content ?’ is closed to new replies.