wizzybang Posted November 25, 2017 Share Posted November 25, 2017 (edited) I am looking to change the way a tweet is constructed using a share button on my website. I have tried to change it but either breaks the page or the tweet is missing parts. The tweet is currently constructed like this: Ralf Little Destroys Jeremy Hunts Lies On The Andrew Marr Show via @username https://******.com/ralf-little-destroys-jeremy-hunts-lies-andrew-marr-show/ However, I would like it to be like this with the via @username being presented at the end of the tweet: Ralf Little Destroys Jeremy Hunts Lies On The Andrew Marr Show https://******.com/ralf-little-destroys-jeremy-hunts-lies-andrew-marr-show/ via @username The PHP code below is how the tweet is being contructed: '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 the $share_twitter_username part which is the part I would like moving to the end: $share_twitter_username = jannah_get_option( 'share_twitter_username' ) ? ' via %40'.jannah_get_option( 'share_twitter_username' ) : ''; As mentioned, I've not been able to do it as it either breaks the whole page or parts of the tweet are missing. Edited November 25, 2017 by wizzybang Quote Link to comment https://forums.phpfreaks.com/topic/305759-need-help-with-the-way-a-tweet-is-constructed-thhrough-a-tweet-share-button/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.