Forum Replies Created

Viewing 1 replies (of 1 total)
  • Hi Mr. footyblogger,
    Actually I was also using the code you mentioned and it worked as you mentioned for older versions prior to 7.0.4 version.
    I have found a solution to this and it worked on my own website. Please check for my website to see the results yourself – https://www.charmjokes.com

    What you have to is to edit the sharethis plugin file. Go to plugin editor and edit the file sharethis.php. Find the following code in the file.

    function st_widget_head() {
    	adding_st_filters();
    	$widget = get_option('st_widget');

    Now, step 1 is to remove the 2nd line from code above making it like below

    function st_widget_head() {
    	$widget = get_option('st_widget');

    Step 2 : find the code like below and comment out the first and last line as shown

    //function adding_st_filters(){
    	// 2006-06-02 Filters to Add Sharethis widget on content and/or link on RSS
    	// 2006-06-02 Expected behavior is that the feed link will show up if an option is not 'no'
    	if (get_option('st_add_to_content') != 'no' || get_option('st_add_to_page') != 'no') {
    		add_filter('the_content', 'st_add_widget');
    
    		// 2008-08-15 Excerpts don't play nice due to strip_tags().
    		add_filter('get_the_excerpt', 'st_remove_st_add_link',9);
    		add_filter('the_excerpt', 'st_add_widget');
    	}
    //}

    And as footyblogger mentioned above the use of following code in the functions.php is a must

    remove_filter( 'get_the_excerpt', 'st_remove_st_add_link', 9 );
    remove_filter( 'the_excerpt', 'st_add_widget' );

    And, you are done removing sharethis from excerpts.

Viewing 1 replies (of 1 total)