Support » Plugin: Smart WYSIWYG Blocks Of Content » [Plugin: Smart WYSIWYG Blocks Of Content] Conflicts with other plugins! (Pin It, AddThis, & YAAR

  • First of all, let me just say that I love this plugin! Thank you so much πŸ™‚

    Just a quick note about using the widget in the sidebar. A client has the Pin It, AddThis, and YAARP plugins installed, which all add something to each post (ie: a Pin button, sharing buttons, and a list of related posts).

    When the widget is placed in the sidebar, those 3 things also show up with it, since the widgets are treated as posts. I was able to remove the Pin It button, as well as the AddThis buttons by hiding them in the stylesheet, but as for the YAARP related posts, I can’t seem to figure it out.

    Anyone else run into this, or know how I can also hide the YAARP list?

    Thanks!

    Here’s the client’s site: http://naturesnurtureblog.com/

    http://wordpress.org/extend/plugins/smart-wysiwyg-blocks-of-content/

Viewing 3 replies - 1 through 3 (of 3 total)
  • I am having the exact same issue with YAARP.

    Did you find a way to resolve this issue?

    The same issue here, this time with the WordPress Events Manager displaying its content in every instance of Smart WYSIWYG Blocks Of Content.

    Any way to solve the problem?

    Here is the solution. In class-swboc-widget.php find lines 28-30:

    foreach ( $swboc_posts as $post ) {
    	echo apply_filters( 'the_content', $post->post_content );
    }

    change to:

    foreach ( $swboc_posts as $post ) {
    	remove_all_filters( 'the_content', 1 );
    	add_filter('the_content', 'do_shortcode');
    	$swboc_output = apply_filters( 'the_content', $post->post_content );
    	echo  wpautop($swboc_output);
    }

    Explanation: remove_all_filters function removes all of the hooks from filter. Function has two parameters, $tag – the filter to remove hooks from (the_content) and $priority.
    This function will also remove the shortcode filter, so we need to re-add it. wpautop filter is also removed so we echoing wpautop(output).
    You can use the same logic in class-swboc-front.php for shortcode output.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Smart WYSIWYG Blocks Of Content] Conflicts with other plugins! (Pin It, AddThis, & YAAR’ is closed to new replies.