Forums

Sociable
the_excerpt adding text... (3 posts)

  1. jpw123
    Member
    Posted 4 months ago #

    The sociable plugin is adding the word "Tweet" to the end of excerpts when in category view. It is only adding this text to the end of excerpts that do not exceed the 55 word limit.

    Has anyone experienced this issue?

    http://wordpress.org/extend/plugins/sociable/

  2. rickyrombo
    Member
    Posted 3 months ago #

    I too have found this problem. I will let you know if I find a workaround.

    EDIT: I found a workaround by going into the plugin. I went to the one labeled Twitter, found where it had:

    return '<a href="http://twitter.com/share" class="twitter-share-button" data-url="'.get_permalink().'" data-text="'.get_the_title().'" data-count="'.$this->option('button').'">Tweet</a>'

    and removed the Tweet from inside the anchor. It doesn't seem to have any immediate problems.

  3. Keith Whannell
    Member
    Posted 1 month ago #

    Cleaner solution.

    Add this to your functions.php

    function fix_social_excerpts($content){
    	$content = str_ireplace('tweet','',$content);
    	return $content;
    }
    add_filter('the_excerpt', 'fix_social_excerpts');

Reply

You must log in to post.

About this Plugin

About this Topic

Tags