Changing the twitter account used in post sharing

Posted in: Newspaper
Post count: 4

Hi,

Whenever the twitter share button in individual post page is pressed, it includes a via <twitter handle>. I want to change this twitter handle. How can I do that?

I know changing site identity is a way, but that’s not an option for me.

Post count: 20688

Hi,

You could change the default functionality, in the theme file where the post sharing is defined
https://www.screencast.com/t/ez682wfg
https://www.screencast.com/t/zvbX3EugDc
The get_bloginfo function is used, more about it here
https://developer.wordpress.org/reference/functions/get_bloginfo/
In the file I mentioned there are two instances of the sharing, a top sharing and a bottom sharing. Make the changes to the one you want, or both of them.

Thanks

Post count: 4

Thanks for your reply. Do you have any plan to create any alternative solution to this issue in future? Personally, I am not really comfortable with editing theme core as these will cause issues during updating theme.

Post count: 20688

Hi,

I don’t think there are plans to make this modification to the sharing. You can make the the change in a child theme, so it will not be lost when the theme is updated
https://forum.tagdiv.com/the-child-theme-support-tutorial/

Thanks

Viewing 4 posts - 1 through 4 (of 4 total)
The forum ‘Newspaper’ is closed to new topics and replies.