Archived topic
How to get Rank Math to integrate a Hook of "elements"
11 replies · Started by David Glass on December 21, 2020
How to get Rank Math to integrate a Hook of "elements" as part of an input? For example, a paragraph embedded via a Hook from GeneratePress to an entry cannot be parsed by Rank Math
Hi there,
i assume that RankMath only parses content that is within the editor or has specific schema.
You would ned to ask RankMath how to parse elements that are hooked in.
Yes!! Thank You David!! ...how make Rank Math to parse elements that are hooked in??
Example: How to???
wp.hooks.addFilter( 'rank_math_title', 'plugin-name', callback_function_to_fetch_title ) // This will hook into title analysis data.
And
wp.hooks.addFilter( 'rank_math_content', 'plugin-name', callback_function_to_fetch_content ) // This will hook into content analysis data.
Were AND How insert this scripts??
Hi there,
Those filters are for the block editor content itself.
Are you trying to use Rank Math in Block Elements, or Hook Elements?
Hi Tom thanks!!
I need Rank Math to admit and relize its work in the texts that I have integrated through a hook as it does with a standard paragraph, in order to obtain a Rank Math calculation as a whole of both, the content paragraphs and the Hook paragraphs inserted to that entry.
When you say Hook, do you mean the regular Hook Element (not the block editor)?
If so, there would have to be a way to integrate Rank Math with a regular textarea custom field - not sure if that's something they support?
Thanks for paying attention to me! Yes, when I say "Hook" I mean the element to create "hooks" of the template "Generatepress". But it could be any plugin that performs the same function as an example: create a text field that will be displayed according to its filter in certain wordpress inputs.
It is important to avoid overload of work in large sites. But Generatepress does not integrate them to Rank Math, that is not good because it does not cooperate with SEO.
I'm still looking for a way to make peace between Generatepress and Rank Math but it's still out of my reach (I'm not a hacker :( ...
I've seen that Yoast has a plugin to consolidate hooks but I don't want to migrate to Yoast.
I'm sorry, English is not my language, but I will learn :)
GeneratePress tries not to integrate with any third-party plugins by default, as that is how bloat starts to creep into a theme.
In this case, does Rank Math make it possible to integrate their plugin with a custom field textarea?
Ideally, you shouldn't really be adding a ton of content into your Hooks, so SEO shouldn't be an issue. Your content should be in your regular post content area.
Has your thinking on this evolved any over the past two years? We just built a site where none of the pages have any content in the usual field. They are all composed of reusable blocks, with elements to "bind" them together under a condition. Are we totally dead in the water when it comes to SEO integration?
Our thinking is still that it's a bad idea to bloat the theme with third-party plugin integrations. You never know when those integrations will no longer be needed, but the code can never be removed.
It's best to ask the third-party plugin (Rank Math) in this case if it's possible to integrate their features with content not found in the traditional post content area. If it is, we'd be happy to help write a function using their available hooks/filters to make it happen with Elements.
