Add twitter code to a widget
-
Hello,
I am trying to create a widget just to add a twitter app code so that i can remove and place it wherever i want to.
What am i supposed to add? Here’s the simple script i would like to add to a widget.[Code moderated as per the Forum Rules. The maximum number of lines of code that you can post in these forums is ten lines. Please use the pastebin]
Thanks id advance.
-
So what do you guys recommend me to do? i don’t really understand sorry.
I wrote a Twitter Widget, that might be instructive. Have a look at the code, and see if it helps. It is written using the Widgets API, which is the proper framework to use when developing custom Widgets.
Thats a cool widget thanks..
but i can’t believe it still does the same thing: http://www.naimedart.com
its not centeredI checked in functions.php in the themes folder and i didn’t really find anything usefulL.
i forgot to precise that before getting this problem i changed the themes size.
i added size to the left area ( content ) and removed some from the sidebar to make it smaller.
Maybe i should of have changed something while doing this?Nevermind thanks, luckily i could change the padding of the general widgets style under style.css and it doesn’t look so bad.
although i would like to ask a question, how can i apply a independent style to a specific widget.although i would like to ask a question, how can i apply a independent style to a specific widget.
That’s actually why I directed you toward my Plugin. 🙂
If you look at this bit:
function widget_cbnet_twitter_widget() { $widget_ops = array('classname' => 'widget-cbnet-twitter-widget', 'description' => 'Widget to display Twitter widgets' ); $this->WP_Widget('plugin_cbnet_twitter_widget', 'cbnet Twitter Widget', $widget_ops); }You can see that WordPress will output a
.widget-cbnet-twitter-widgetclass that you can target for CSS styles specific to this Widget.Thanks i can now consider it as resolved. Thanks for your help
The topic ‘Add twitter code to a widget’ is closed to new replies.