The Twitter Timeline widget in Jetpack provides a field to set up a title shown before the tweets, such as “Recent Tweets”. But I want to modify the title to show “Recent Tweets (@MyTwitterHandle)” where @MyTwitterHandle is a link to my Twitter public timeline.
I don’t think I can put an HTML link within the title field directly from the Jetpack widget setup form for Twitter Timeline. So I think it might take some coding.
I noticed in looking at jetpack/modules/widgets/twitter-timeline.php line 50 says:
echo $args['before_title'] . apply_filters( 'widget_title', $instance['title'] ) . $args['after_title'];
So, I’m wondering if I could do something like
add_filter('widget_title'....)to modify the title text, from my theme functions.php file? What is the best way to modify the title so it will be least likely to break in the future, if there are changes to the widget?
- The topic ‘Modify title text for Twitter Timeline widget’ is closed to new replies.