Hide Simple Social Buttons plugin output in custom post type

I’m working in a custom post type and now I need to hide the output generated by Simple Social Buttons plugin. I tried this code: remove_filter('the_content', 'plugin_action_links', 100); in single-magazine_post_type.php just below get_header() but didn’t work. Any advice?

PS: Exists any plugin that can work on this without the need to touch code all the time?

Related posts

Leave a Reply

1 comment

  1. There is a function in simple social plugin called insert_buttons in simple-social-buttons/simple-social-buttons.php. This function puts social buttons to your content. You can make an exception there like;

    function insert_buttons($content) {
        global $post;
        if ( !empty( $post ) ) {
            if ( get_post_type( $post ) == "your_post_type") {
                return $content;   
            }
        }
       ......
    }
    

    Edit: How to do that?

    1) Open plugin editor in admin panel

    enter image description here

    2) Select Simple Social Buttons from the list

    enter image description here

    3) Select buttons/simple-social-buttons.php from list

    enter image description here

    4) Update insert_buttons function as I mentioned above

    enter image description here