Family Encyclopedia >> Electronics

How to Display Targeted Tweets in WordPress Widgets: A Step-by-Step Guide

One of our readers recently asked how to showcase specific tweets in a WordPress widget. We've previously covered adding the official Twitter follow button, Twitter Cards, and displaying recent tweets using the Twitter widget. Twitter's widget features powerful options for custom streams based on lists, hashtags, or searches. In this guide, we'll walk you through proven methods to embed targeted tweets in WordPress.

How to Display Targeted Tweets in WordPress Widgets: A Step-by-Step Guide

Video Walkthrough

Subscribe to WPBeginner. If you prefer reading or need more details, continue below.

Show Tweets from a User with a Specific Hashtag or Keyword

To create a Twitter widget displaying only your tweets with a certain keyword or hashtag, visit the Twitter Widgets site and click the Search tab. In the search query box, enter de: wpbeginner #WordPress. Replace wpbeginner with your Twitter handle and #WordPress with your keyword or hashtag.

How to Display Targeted Tweets in WordPress Widgets: A Step-by-Step Guide

Save your widget and copy the embed code.

How to Display Targeted Tweets in WordPress Widgets: A Step-by-Step Guide

In WordPress, go to Appearance » Widgets. Drag a Text or Custom HTML widget to your sidebar, paste the code, save, and preview your site.

Using Twitter Search to Create Custom Streams

Twitter's robust search engine uses specialized operators for advanced queries, unlike standard article searches. Our example focused on a user's tweets with a keyword or hashtag. Filter for replies, mentions, links, location-based tweets, and more. Explore Twitter's search parameters to build tailored tweet streams.

We hope this helps you embed targeted tweets in WordPress widgets. Questions? Leave a comment below or follow us on Twitter.