WordPress.org

Ready to get started?Download WordPress

Forums

Really simple Facebook Twitter share buttons
[resolved] Twitter button error (12 posts)

  1. ChrisStoneman
    Member
    Posted 2 years ago #

    The twitter button is clashing with another plugin, called Auto Post Title. I am using this plugin to add the category name into the Post Title automatically. Therefore, the twitter button queries the incorrect title, resulting in the source code being displayed instead of the button, eg...

    <a href=“http://twitter.com/share” class=“twitter-share-button” data-count=“none” data-​​text=“PLAYLIST : Act Of The Apostle By God Help The Girl” data-url=”http://www.wordsaboutmusic.co.uk/10/2010/playlist/act-of-the-apostle/”>

    Any ideas how to fix it??

  2. ChrisStoneman
    Member
    Posted 2 years ago #

    Adding the auto-post-title tag to this thread.....

    To clarify what is happening here, the Really Simple Share plugin is querying the post title in order to display the twitter icon. However, as this title has been modified by the plugin 'Auto Post Title', only the raw code is being displayed, not the twitter icon

  3. ChrisStoneman
    Member
    Posted 2 years ago #

    Any ideas anyone?

  4. ThoughtLab
    Member
    Posted 2 years ago #

    So, Auto Post Title is working as it should, and it's giving the share plugin the formatted title, but it's blowing up sometime after? I will have to look at the code for this share plugin to see what it's doing.

  5. whiletrue
    Member
    Plugin Author

    Posted 2 years ago #

    Hi ChrisStoneman,
    to test your issue I put the two plugins together in different websites, everything works fine. Are you sure that in your site the problem is caused by only these two plugins?

    Please check out the following:

    • does the Twitter button show correctly if you disable Auto Post Title ?
    • is there any html tag involved in the title, or just plain words?
    • do you experience the issue on every single post or it's variable?
    • do you experience the issue in both the home/category pages and the single post page? I ask this because our plugin is activated in different ways
  6. whiletrue
    Member
    Plugin Author

    Posted 2 years ago #

    Also, I found that the Auto Post Title plugin doesn't work on the first post ... I didn't investigate the reason, but that could be related to your problem.

  7. ChrisStoneman
    Member
    Posted 2 years ago #

    Hi,
    In answer to your questions...

    - yes, twitter button works fine when Auto Post is disabled

    - there's no html in title, the code I use with the Auto Post Plugin is [category case=upper] : [title case=words]
    removing the [category case=upper] section enables the twitter button to work. Adding the category to the title seems to be what causes the twitter button to fail

    - this occurs on every post. There are no exceptions

    - the issue does not occur on the home/category pages. It only occurs on the single pages.

    I believe the Auto Post Plugin does work on the first post, I don't think this is related.

    Strangely, the twitter button DOES WORK, when the email share button is also activated. However, the email button then doesn't work, and spews out similar code to when the twitter button fails. Also, when the post is then shared via twitter, the link it gives it not as clean as the link it gives when Auto Post Plugin is not adding the category name to the title

    I believe the solution will lie in amending the way the Twitter button grabs the title of the post.

    I have left the fault on my site for you to see
    http://www.wordsaboutmusic.co.uk/06/2011/playlist/bright-eyes-false-advertising/

    Thanks so much for your help, it's much appreciated

  8. ChrisStoneman
    Member
    Posted 2 years ago #

    I have resolved this by using another twiter share plugin, called WP Tweet Button.

  9. ThoughtLab
    Member
    Posted 2 years ago #

    Auto Post Title hooks into the_title filter, so anything that uses the_title(); or add_filters('the_title',...); will use Auto Post Title. But if a plugin uses $post->post_title to get the title, then Auto Post Title will not be applied.

  10. whiletrue
    Member
    Plugin Author

    Posted 2 years ago #

    Hi ChrisStoneman,
    the new release 1.8.4 of our plugin adds some code to clean the post title (removing html tags) inside the Twitter button, probably it could fix your issue. Please let us know if it works for you!

  11. ChrisStoneman
    Member
    Posted 2 years ago #

    Hi WhileTrue,
    Yes this fixes the twitter problem, thank you. Unfortunately when the post is shared on Facebook, the title still has some HTML emdedded in it. Any ideas how I can remove this?
    Thanks

  12. whiletrue
    Member
    Plugin Author

    Posted 2 years ago #

    Hi Chris,
    the Facebook buttons only take the post link as parameter, so the plugin can't clean the title format for it ... sorry :(

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic