WordPress.org

Ready to get started?Download WordPress

Forums

Add Twitter, Facebook Like, Google plus one Social share
[resolved] Strip title of HTML for Twitter (4 posts)

  1. michaelcollado
    Member
    Posted 2 years ago #

    I wanted to know if it's possible to strip the title of its HTML so that posts are tweeted out neatly. Perhaps if the plugin can call the_title_attribute or if a filter code can be implemented?

    http://wordpress.org/extend/plugins/twitter-facebook-google-plusone-share/

  2. michaelcollado
    Member
    Posted 2 years ago #

    Never mind. I misspelled "attribute" in the code and broke the site which is why I thought it wasn't possible. If anyone's having this problem just look for

    $post_title = get_the_title();

    In tf_display.php and replace it with

    $post_title = the_title_attribute();
  3. michaelcollado
    Member
    Posted 2 years ago #

    Wait, unresolved actually. It does help but it displays the title anyway before the button on the post. :/ Anyone know of a way to filter out HTML code for the twitter button?

  4. michaelcollado
    Member
    Posted 2 years ago #

    Hahaha! Okay, I'm the worst. Figured it out now:

    Once again, if anyone needs it:

    $post_title = the_title_attribute (array('echo' => 0) );

Topic Closed

This topic has been closed to new replies.