• Wonderful plugin!

    I’m noticing one outstanding issue with the plugin’s use of the standard the_content filter hook. Since other plugins and themes use this hook to inject their own content, I’m noticing that when I add a reusable block in a widget area, that it’s also injecting other plugin content into the block as well.

    I’m guessing that the easiest solution would be to create a custom reblex_the_content filter and hooking reblex_display_block(), reblex_shortcode(), and reblex_get_block() into it–basically anywhere the_content filter hook is being used in reusable-blocks-extended.php, to avoid such conflicts.

    See: https://www.billerickson.net/code/duplicate-the_content-filters/

    • This topic was modified 4 years, 7 months ago by tnoguchi.
    • This topic was modified 4 years, 7 months ago by tnoguchi. Reason: Edit for additional clarification
Viewing 3 replies - 1 through 3 (of 3 total)
  • I feel I am running into a similar issue to this. I have used your plugin to add a reusable block to a widget area on my website’s homepage.

    I am also using a social plugin, TF Social Share and I am seeing the share buttons on the widget.

    Is there a solution to this?

    Luciano

    (@lucianobosco)

    Hi there! Did you figure out how to use the PHP reblex_display_block() within the_content? I’m simply doing this, but just get an error 500

    function prepend_content( $content ) {
        return reblex_display_block(3810).$content;
    }
    add_filter('the_content', 'prepend_content');

    I’ve also tried

    function prepend_content( $content ) {
        return '[reblex id="3810"]'.$content;
    }
    add_filter('the_content', 'prepend_content');

    But no luck…

    • This reply was modified 4 years, 5 months ago by Luciano.

    @lucianobosco
    Just replace “the_content” with “reblex_the_content” in “reusable-blocks-extended.php” and you will be fine ??

    @plugin Author: Could you please update the sources to this changes?

    I had also issues with double instancing of the_content in hook. In CM Routes Manager for example it leads to a endless loop and a 503 error.

    Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Problems with using the_content filter hook’ is closed to new replies.