• Resolved marilyn1998

    (@marilyn1998)


    Twitter and pinterest are only showing post title (or Pinterest image title). No description, meta data, twitter handle or link show in the tweet. Am I missing a setting? Yoast includes all the info.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Robin Cornett

    (@littlerchicken)

    There is a plugin setting to add your Twitter handle to the tweet (under Settings > Scriptless Social Sharing). Otherwise, yes, the plugin will only prepopulate the tweet with the post title and handle, if it’s set, since other data could come from a variety of sources, such as Yoast’s social media settings.

    Thread Starter marilyn1998

    (@marilyn1998)

    Thank you. It was already set. I have troubleshot it down to all my “parties”. Example of a title is Over The Moon #84. All are set up with the name and number of the party. The URL shows https://www.marilynstreats.com/over-the-moon-84/ and after the title in the tweet it stops picking up the info. When I tweet from the button add this Over The Moon https://www.marilynstreats.com/over-the-moon-84/ via @Marilyn_Lesniak, the tweet works. Is there something nin that url thast would stop the plugin from adding it? All my other posts seem to work. Thx.

    Plugin Author Robin Cornett

    (@littlerchicken)

    Thank you–having the link and explanation helped me figure out where the issue is, which is that # characters are not allowed in Twitter URLs (ref: Stack Overflow).

    Per that thread, you can get around that by replacing the # character in your URL. This code seems to work for me (you can add this to your theme functions.php file or someplace similar, but please practice safe coding and back up your files, etc. etc.):

    
    add_filter( 'scriptlesssocialsharing_twitter_url', 'prefix_update_pound_signs', 100 );
    function prefix_update_pound_signs( $url ) {
    	return str_replace( '#', '%23', $url );
    }
    

    Although this seems to work, it will, as I understand it, have the net result of converting your #84 to a hashtag in tweets, which I doubt would be helpful to you. Another option which would avoid this would be to change your title format to not include the #.

    Thread Starter marilyn1998

    (@marilyn1998)

    Thank you so much!! It worked like a charm changing the title. Good to know about twitter and special characters.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Twiiter button only showing post title’ is closed to new replies.