This free wordpress plugin displays the most recent twitter status updates for a particular hash tag in your posts/pages using shortcode.
Usage
Put this shortcode inside the body of a post, page or custom post type. Change the attribute values (hash = the keyword you want to search for, number= the number of results you want to display).
The twitter conversation on #YOUR_TAG_WITHOUT_THE_#_SIGN
Please wait, fetching the tweets…
![]()
You can set some options in the Settings / Twitter Hashtag Conversation option menu which would allow you to just insert the twitter conversation stream using those defaults.
Design
Add this css code to your style.css then customize it to suit your needs.
/*--- hashtag_tweets ---*/
.twitter-hash-tag{border:1px solid #EEE;padding:10px;background:#FFF;}
.thts-message a{color:#CC0000;}
.twitter-hash-tag a{border:none !important;}
.twitter-hash-tag div.thts-post{margin-bottom:10px;position:relative !important;min-height:80px;}
.thts-profile{width:70px;display:block;position:absolute;min-height:70px;}
.thts-profile-username{color:black;font-weight:bold; text-transform:capitalize;font-size: 11px;display:block;}
.thts-profile-thumb{max-width:50px !important; margin:0 10px 10px 0;vertical-align: bottom;padding:5px;border:1px solid #EEE !important;background:white!important;}
.thts-message{margin-left:70px !important;vertical-align:top;overflow:hidden;background:#F7F7F7;padding:10px;border-radius:6px;}
.thts-message:hover{background:#F1F1F1;}
.thts-sourcelink{background:#FEFEFE;border:1px solid #EEE;border-radius: 4px; color:#999;padding:3px 5px;float:right;}
.thts-date{color:#bbb;float:right;text-shadow:1px 1px 1px #FFF;font-size:11px;}
#thc_loading{background:#DDD;color:#333;font-size:10px;width:100px;float:right;}
Demo
Feeling generous?
If this plugin served you well, why not send some love back to me? That’s also a nice way to motivate me into adding features you’d need, wink, wink.
Download
You can download the Twitter Hashtag Conversation plugin on the wordpress repository.
Hi,
Could you please share which is the code I need to use to add the functionality in the template directly? Like the
bit !??!I cannot use the shortcode there …
Thanks!
try
< ?php echo do_shortcode('[twitter_hashtag hash="candy"]'); ?>
that was fast :) thank you v.much, I will !
sorry, not working :-(
nor the code or the plugin as such – remains blocked on “refreshing” than no tweets are pulled :-(
Also wanted to use it with custom post types, but that is not working either :-(
Maybe next time :)
show me the url pls
We cant get this to work either – tweets wont load.
http://www.justhorseracing.com.au/general-news/breaking-news/social/black-caviars-royal-ascot-fan-page-goblackcaviar/152677
If you could take a look and help us we would appreciate it :)
Okay I ruled it down to the plugin clashing with this file. Not sure what can be done to fix it? Hope you can help!
http://www.justhorseracing.com.au/wp-content/themes/sportpress/js/jtools.js
jquery Tools is notorious for throwing up a lot of javascript errors. Problem is: when a fatal error occur, all the javascript that was to be processed afterwards breaks. What you could do is update the script to its latest version, available here (1.2.7 at the time of writing): http://jquerytools.org/download/
Thank you for following up.
Hi, maybe a stup quest, but it is possible to define the hashtag variable in the
statement (below) where the hast tag would the title of the post? Truncated or concatenated?
Sorry, it looks like a part of your message didn’t make it through. Can you rephrase?
Say I wanted the twitter hashtag to be the title of the post. For example rote a review on the music group Sonic Youth. Could I set the plugin in the CSS or a custom field so that the hash tag it pulls is the title of the post?
A title is usually too long to qualify as the best search string. I can imagine a few cases where that would be working, but most of the time, it is just more convenient to hardcode the best keywords in the shortcode, and it doesn’t take that much time. I don’t think you’d want to have it automated – a few seconds saved but a lot of accuracy lost.
Thanks for your response. I thought that would be the case. Nonetheless this is a great plug in for what we are using it for and keep up the great work.
Thanks Robert.
Thanks for the plugin. Testing it with #HDBsale. Initially the tweets are displayed. But now there are not. Tried other hashtags like #design & #hdb, they work. Anything wrong with #HDBsale?
Thanks in advance.
I don’t see any tweet with that hashtag. See it for yourself: https://twitter.com/#!/search/realtime/%23HDBsale
Tks for checking. I’ll try to figure it out.
Can’t get you plugin to work? Help : 4peaks.co.za
Help me help you: provide the url to the page where i can see the twitter hashtag plugin (not) working.
Most of the time, it’s a javascript error from other plugins that break other plugins (like this one) from working, so check the javascript console just to be sure.
Hi, I’m trying to use this great plugin twice on one page, and find the second instance does not display the correct hashtag in the title using {HASHLINK}. It’s showing the correct tweets, but displaying the same {hashlink} as the first instance.
Page in question is located here: http://www.volunteerincambodia.org/faq/cambodia/
Thanks!
Thanks for letting me know: i’ve just pushed a patch on the SVN. Update to version 1.6.2 and it should be fixed.
Wow, fast! Updated and working as it says on the box. Thank you!
I am trying to put the shortcode inside a sidebar widget. It seems as it’s not possible. It only shows a link to the Twitter page and the text “Loading tweets…”. Is there any way to make it work?
sounds like a javascript issue. Post a link so i can have a look.
I deleted the shortcode from the sidebar and replaced it with a link to a separate webpage with the shortcode (where it works just fine!). The sidebar now holds the standard Twitter Widget, showing the tweets from the account.
http://www.tedxgoteborg.com/
I have your plugin installed but the page that it’s on has a very dark background, almost black, so the text on the title isn’t showing up (http://www.beachesliving.ca/beacheslife/earth-hour-lights-out-beaches/) Am I able to change the color of the title text? How?
yes, see the .css file.
I would like to use the ‘Twitter Hashtag-based Conversation’ plugin with a custom field supplying user specified the hashtags.
I have an issue with the short code not working when using echo do_shortcode(‘[twitter_hashtag hash="candy"]‘); (for example) in a template.
The shortcode works fine when placed in the visual editor for a page or post. The shortcode doesn’t work however when placed in a theme template using do_shortcode.
For example the following is not working:
echo do_shortcode(‘[twitter_hashtag hash="design,development" number="10" title="Latest tweets about {HASH_LINK}"]‘);
I opened up the plugin files and saw the following information at the bottom of the ‘pixeline-twitter-hashtag.php’ file:
/* — TEMPLATE TAG FOR CONVENIENCE — */
function pixeline_TwitterHashtagConversation($hash, $number, $title) {
$TwitterHashtagConversation = new TwitterHashtagConversation($hash, $number, $title);
}
Based on this I have placed the following code into a theme template but no feed information is loaded even though the function pixeline_TwitterHashtagConversation() does exist:
if (function_exists(‘pixeline_TwitterHashtagConversation’)){ pixeline_TwitterHashtagConversation(‘design’,3,’title’);
}
I just wanted to ask because the plugin is really good other than the issues I have experienced while putting it into templates rather than into the WordPress visual editor with a shortcode the plugin has been great.
Am I using the template tag incorrectly or is something else wrong?
Or alternatively should do_shortcode be working, is there something wrong with the code I used with that option?
I figure resolving these issues might help some other people as well.
Thanks
Interestingly, if I place the do_shortcode function in a template below the_content(); and I include the shortcode in the visual editor….then both the shortcode embeds work.
I can work it out, but it seems that the shortcode in the visual editor is loading or doing something which the do_shortcode function placed in a theme template is not doing.
Interesting, I’ll keep digging.
Ok, it appears that the only way to use the plugin is to use the shortcode in the visual editor.
Hi Peter,
Sorry for the late reply. I think the plugin becomes pretty much useless with the new Twitter rules. We’re all supposed to use their layout, provided by their widgets. You might be better off doing just that.
Is it possible to add a autorefresh or “live” option to the plugin? Or is there a solution now?
The plugin automatically refreshes. See the plugin options.
Hi, thank you for your fast answer. How can i set, that the twitter posts in feed open in a NEW window, not in same window?
Hi,
Since yesterday your script don’t work as espected. http://www.salvofranchina.it/2013/06/this-must-be-the-place/ below, you can see the space but nothing appears. It was working til 3 days ago.
What’s wrong?
In addition: in the // constants setup // (file /pixeline-twitter-hashtag.php, I’ve changed the string from searc.twitter.com/search?q to https://twitter.com/search?q= due the generated 404 page not found if you would click on hashtag frontend generated url.
Can you please help me to find out the problem, as this is the best related plugin?
Hi,
The plugin is working fine. But when i use more than 30 tags then its show nothing i mean empty page which says refreshing.
Can you pls help me out?
Thanks in advance..
30 tags? that’s just too much, probably the Twitter api does not like it. Try reducing down the list: four or five, at most.
But in my case i need more than 30. Is there any solution for this?