Support » Fixing WordPress » Tweet Construction When Sharing

  • Hi All,

    I have a bit of a niggle on my website. When using the twitter share button on my site it will construct the tweet in this format:

    Ralf Little Destroys Jeremy Hunts Lies On The Andrew Marr Show via @bangsthought https://bangsthought.com/ralf-little-destroys-jeremy-hunts-lies-andrew-marr-show/

    I would like it like this in the traditional format where the via @bangsthought is at the end:

    Ralf Little Destroys Jeremy Hunts Lies On The Andrew Marr Show https://bangsthought.com/ralf-little-destroys-jeremy-hunts-lies-andrew-marr-show/ via @bangsthought

    I have found the code that contructs this but I’m having issues changing it, I have tried to change it several different ways but it screws the whole post on the page. This is the original code:

    'twitter' => array(
    'url'   => 'https://twitter.com/intent/tweet?text='. $post_title .   $share_twitter_username .'&url='. $post_link,
    			'text'  => esc_html__( 'Twitter', 'jannah' ),
    		),

    This is the code for this part $share_twitter_username:

    # Twitter username ----------
    	$share_twitter_username = jannah_get_option( 'share_twitter_username' ) ? ' via %40'.jannah_get_option( 'share_twitter_username' ) : '';

    Hope this makes sense and hope someone can help.

Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Tweet Construction When Sharing’ is closed to new replies.