WordPress.org

Ready to get started?Download WordPress

Forums

Smart WYSIWYG Blocks Of Content
Conflicts with other plugins! (Pin It, AddThis, & YAAR (4 posts)

  1. basememara
    Member
    Posted 1 year ago #

    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/

  2. mhutchings
    Member
    Posted 1 year ago #

    I am having the exact same issue with YAARP.

    Did you find a way to resolve this issue?

  3. rszczypka
    Member
    Posted 1 year ago #

    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?

  4. dariodev
    Member
    Posted 1 year ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.