=== Twitter Widget ===
Contributors: fossasia Tags: loklak, feed, tweet feed, loklak API, twitter, widget, feed Requires at least: 3.0 Tested up to: 4.3 Stable tag: 1.0
A widget that properly handles twitter feeds, including parsing @username, #hashtags, and URLs into links.
== Description ==
A widget that properly handles twitter feeds, including parsing @username, #hashtag, and URLs into links. It supports displaying profiles images, and even lets you control whether to display the time and date of a tweet or how log ago it happened (about 5 hours ago, etc).
== Installation ==
== Frequently Asked Questions ==
= Can I follow more than one feed? =
Absolutely, each instance of the widget can have different settings and track different feeds.
= I get an error similar to "Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /.../wp-twitter-widget.php on line ##" when I try to activate the plugin. Is your plugin broke? =
No. This error occurs because the plugin requires PHP 5 and you're running PHP 4. Most hosts offer PHP5 but sometimes you have to enable it in your control panel, through .htaccess, or by asking them. There may be instructions for your specific host in the Switching to PHP5 article in the codex.
= How can I add this widget to a post or page? =
You can now use the twitter-widget shortcode to embed this widget into a post or
page. The simplest form of this would be [twitter-widget username="yourTwitterUsername"]
= How exactly do you use the twitter-widget shortcode? =
The simplest form of this would be [twitter-widget username="yourTwitterUsername"]
However, there are more things you can control.
You can see these put into action by trying something like:
[twitter-widget username="wpinformer" before_widget="<div class='half-box'>" after_widget="</div>" before_title="<h1>" after_title="</h1>" errmsg="Uh oh!" hiderss="true" hidereplies="true" targetBlank="true" avatar="1" showXavisysLink="1" items="3" showts="60"]Your Title[/twitter-widget]
[twitter-widget username="wpinformer" before_widget="<div class='half-box'>" after_widget="</div>" before_title="<h1>" after_title="</h1>" errmsg="Uh oh!" hiderss="true" hidereplies="true" targetBlank="true" avatar="1" showXavisysLink="1" items="3" showts="60" title="Your Title"]
[twitter-widget username="wpinformer"]
= How can I style it to look nicer? =
There are plenty of CSS classes throughout the HTML that is generated, and you can use those to style things. Here is some sample CSS that I use with the Essence Theme. You'll need to get the "Everything" sprite from Twitter's Image Resources.
.widget_twitter div {
padding:0;
}
.widget_twitter ul li {
margin-bottom:5px;
}
.widget_twitter .follow-button,
.widget_twitter .xavisys-link {
margin:0 10px 10px 25px;
}
.widget_twitter .entry-meta {
display:block;
font-size:80%;
}
.widget_twitter .intent-meta a {
background: url(images/everything-spritev2.png); /** from Twitter ressources */
display: inline-block;
height: 16px;
text-indent: -9999px;
width: 16px;
}
.widget_twitter .intent-meta a.in-reply-to {
background-position: 0 center;
}
.widget_twitter .intent-meta a:hover.in-reply-to {
background-position: -16px center;
}
.widget_twitter .intent-meta a.favorite {
background-position: -32px center;
}
.widget_twitter .intent-meta a:hover.favorite {
background-position: -48px center;
}
.widget_twitter .intent-meta a.retweet {
background-position: -80px center;
}
.widget_twitter .intent-meta a:hover.retweet {
background-position: -96px center;
}
= Why can't I display a friends feed anymore? =
Aparently the database queries required to display the friends feed was causing twitter to crash, so they removed it. Unfortunately, this is outside my control.
== Screenshots ==
To use the widget, go to Appearance -> Widgets and Add "Twitter Widget" widget.
Each widget has settings that need to be set, so the next step is to click the down arrow on the right of the newly added widget and adjust all the settings. When you're done click "Save"
This is what the widget looks like in the default theme with no added styles.
By using some (X)HTML in the title element and adding a few styles and a background image, you could make it look like this.
== Upgrade Notice ==
= 1.0 = A whole new version!