When someone share via the twitter share button, I would like to automatically add via @breyeschow after the link or title.
Your problem is fixed now 🙂
Hi,
Apologies for the delay in replying to you. To resolve this issue, you can open the single.php file in the folder path “wp-content\themes\dw-fixel”. Find the line 15 then replace the following code:Â
<li><a class="twitter" href="https://twitter.com/intent/tweet?source=webclient&text=<?php echo get_the_title() . rawurlencode( $url ) ?>" title="<?php _e('Share to Twitter',DW_TEXTDOMAIN) ?>" target='_blank'><i class="icon-twitter"></i><span><?php echo dw_get_twitter_count( $url ); ?></span></a></li>
With new code:
<li><a class="twitter" href="https://twitter.com/intent/tweet?source=webclient&text=<?php echo get_the_title() . rawurlencode( $url ) ?> @breyeschow" title="<?php _e('Share to Twitter',DW_TEXTDOMAIN) ?>" target='_blank'><i class="icon-twitter"></i><span><?php echo dw_get_twitter_count( $url ); ?></span></a></li>
Hope this helps !
Thanks so much. That did solve one problem. One very small tweak is needed. When I click on the share, there is not space between the title and the url. Where should I add a space? http://www.reyes-chow.com/2014/09/10-important-questions-to-ask-when-choosing-a-high-school-in-san-francisco/
You can replace with new code:
<li><a class="twitter" href="https://twitter.com/intent/tweet?source=webclient&text=<?php echo get_the_title() .' '. rawurlencode( $url ) ?> @breyeschow" title="<?php _e('Share to Twitter',DW_TEXTDOMAIN) ?>" target='_blank'><i class="icon-twitter"></i><span><?php echo dw_get_twitter_count( $url ); ?></span></a></li>
Hope this helps !
That didn’t work. Code messed up the side bar. Went back to the first suggestion, so still have the issue with no space between the title and the http://
This is what it looks like without the space before the http, “Nine Reasons to Go See Selmahttp://www.reyes-chow.com/2014/12/go-see-selma/ via @breyeschow”
Figured it out
Please login or Register to submit your answer