With the Timeline Express Twitter Feeds Add-On we have made it easy to pull in Twitter feeds to display on your site. One question we often received was if it was possible to pull in twitter feeds to display to users, instead of just using WordPress post types. Naturally, we started tinkering and this product was created!
Now you can use the Timeline Express layout you have come to know and love, to display tweets and user feeds to visitors on your site. By adding new parameters to the
[timeline-express] shortcode, you can quickly setup a custom Twitter timeline.
- Display a specified users Twitter feed.
- Display a combination of user tweets on a single timeline.
- Display results of a tweet search term (search usernames, hastags or terms).
- Display tweets from a specific geolocation (latitude/longitude). (Perfect for display tweets for an event happening at a certain location.)
- Combine user name + search term or geolocation + search term, for unique twitter timelines.
- Optional live reloading, with custom time interval to check for new tweets.
New Shortcode Parameters
tweet-count– Set the number of tweets to display on the timeline.
tweet-order– Set the twitter timeline to display in ascending or desecnding chronlogical order.
twitter-term– Specify a term to search twitter for, and return related tweets.
twitter-geocode– Specify a latitude, longitude and distance from the location to pull tweets from.
result-type– Display recent tweets for a term/user or only display the most popular tweets.
trim– During live reloading, old tweets are removed and the new, most recent, tweets replace them on the timeline. New items can be appended to the timeline, or replace existing ones.
live-reload– Toggle on/off the live reloading functionality for twitter timelines.
interval– Adjust how often your timeline will check for new tweets for your given term or username.
To display the last 20 tweets form the CodeParrots twitter account, your shortcode would look like:
[timeline-express twitter-feed="1" twitter-user="CodeParrots" tweet-count="20"]
Geolocation + Hashtag Feed
Let’s say that you have an event, possibly a conference, going on and you want to display a live timeline of tweets for that event’s hashtag, and only from users who are attending the event. This is where the power of combining the search term and geolocation parameters comes in handy.
In our example, let’s say we are hosting a tech event at Madison Square Garden and people at the event are using the hashtag #TECHMSG. We can easily display a twitter feed from users at the event, using the hashtag #TECHMSG.
First you’ll need the longitude and latitude of Madison Square Garden, which can easily be found using Google Maps (40.7505045, -73.9934387). Additionally, we want to specify how far outside of those parameters we’d like to search. In our example, we’ll use 1 mile as the max distance.
The final shortcode would look like:
[timeline-express twitter-feed="1" tweet-geocode="40.7505045,-73.9934387,1mi" live-reload="on" tweet-count="20"]