Internal Linking Related Contents

Product details
MediamaticMediamatic
MediamaticPLUS
Nov 5, 2023

Q: Does this work with page builders like Breakdance?

Founder Team
Alex_Themeinprogress

Alex_Themeinprogress

May 15, 2024

A: I've analyzed the code of this plugin, and I've noticed that for the 'the_content' filter (which handles the insertion of related posts within the content), a negative value is used as the execution priority.

If I modify the default value on line 7 of the file 'breakdance/plugin/action_filters/the_content.php':

add_filter('the_content', '\Breakdance\ActionsFilters\replace_the_content_with_breakdance_content', -2147483648);

by setting a value higher than the one used by the 'Internal Linking of Related Content PRO' plugin:

add_filter('the_content', '\Breakdance\ActionsFilters\replace_the_content_with_breakdance_content', 999);

the issue of double loading is resolved.

Hope it helps

Best regards

Alex

Share
Helpful?
Log in to join the conversation

Hello

I installed the free version of the plugin and tried to add the Post Content module from the Dynamic section and the related posts are loaded, but there seems to be a conflict between the two plugins, since the related posts appear twice, if I set a lower value of 10 for the_content hook priority option, it seems the issue is resolved for posts generated by this builder, but related posts disappear from all other posts.

Unfortunately there doesn't seem to be a similar option on this page builder.

Best regards

Alex

Thank you Alex, i really appreciate that and the time you have taken it is fantastic support wise, but unfortunately editing files like that is beyond my ability, which is a shame as all my sites use breakdance, andf i would love to use your plugin, but i wouldnt be confident in editing the files.

Hello

Unfortunately it depends on the page builder, so I can't help you, perhaps you could contact their support and ask if they can add an option to manage the priority of the WordPress the_content filter

Hope it helps

Best regards

Alex

Hello Alex, have you updated this to work with breakdance at all?

I think I get to ask this question every year Alex :-) but have you incorporated breakdance at all ?

Hello

The issue is that the Breakdance plugin does not seem to use WordPress’s native the_content function, which the plugin relies on to generate content, and there doesn’t appear to be a corresponding hook to attach to in order to automatically insert related posts within the content generated by this page builder.

Moreover, the latest versions of Breakdance also no longer seem to load related

In addition, if the error — or the code I previously pointed out — inside Breakdance is not fixed, the plugin will not be able to add related posts within the content generated with this builder.

Have you tried contacting their support service about this?

Thank you

Alex