Support » Plugin: Recent Tweets Widget » Including widget in theme

  • Resolved WP_dj


    Hi, awesome work.

    I’m trying to include it in my theme through:


    in functions.php, just like I usually do with any other plugin, but for some reason the widget doesn’t appear. It does if I install the plugin as normal. Any hint on that?

    Thank you


Viewing 5 replies - 1 through 5 (of 5 total)
  • Hey, thanks!

    There can be many reasons why it doesn’t appear. Sorry if I may sound harsh but it’s your task to figure it out in your code. 🙂 I should see it, play with it, but I really don’t have time for that. Sorry.

    I create themes (and provide support) so I totally understand do not worry.

    By the way just had to change the action from ‘init’ to ‘widget_init’.

    Thanks again for your work.


    First of all, you also need to place twitteroauth.php in the same directory where recent-tweets.php file is included.

    Secondly, open recent-tweets.php and replace widget registration code with this (code is located at bottom of file)

    // register	widget
    function register_tp_twitter_widget(){
    add_action('widgets_init', 'register_tp_twitter_widget');

    You may also need to replace whole construct function with this code:

    function tp_widget_recent_tweets()
    			$widget_ops = array('classname' => 'tweets', 'description' => '');
    			$control_ops = array('id_base' => 'tweets-widget');
    			$this->WP_Widget('tweets-widget', 'Twitter tweets', $widget_ops, $control_ops);

    Thanks sakib000 for helping him out with this. 🙂

    Thank sakib000 just was I was looking for. ThemePrince, great plug in. Many Thanks.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Including widget in theme’ is closed to new replies.