The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Recent Tweets Widget
[resolved] Including widget in theme (6 posts)

  1. WP_dj
    Posted 3 years ago #

    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



  2. ThemePrince
    Posted 3 years ago #

    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.

  3. WP_dj
    Posted 3 years ago #

    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.

  4. sakib000
    Posted 3 years ago #


    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);
  5. ThemePrince
    Posted 3 years ago #

    Thanks sakib000 for helping him out with this. :)

  6. Jason818
    Posted 2 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Recent Tweets Widget
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.