WPCandy talked about building a functionality plugin which is to take functions that could be added to your theme’s functions.php file and making a plugin out of them so if you change themes you won’t lose any essential functionality ( like shortcodes etc).

But what if you want to do the opposite and take a plugin’s functionality and build it directly into your theme? That’s the subject of this quick guide – I will show you how to take a Twitter widget plugin and make it part of your theme.

The Plugin File

The plugin we will be using is DP Twitter Widget, what this plugin does is add a new widget which you can display your tweets live on your site. Download the plugin and unzip the file. Inside the zip you will see several files, the one we need is called dp-twitter-widget.php. Within your theme directory, create a new folder and call it “widgets” and upload this file to there.

Theme Functions.php

Now open your theme’s functions.php file and add the following line to it to call the plugin file :


Save your functions.php file and upload.

The Widget

Now within your WordPress admin panel, visit “Appearance” > “Widgets” and you should see an extra widget has been added :


Oliver Dale is the founder of Kooc Media, An Internet Company based in Manchester, UK. I founded WPLift and ThemeFurnace, find out more on my Personal Blog. Thanks!

Siteground Hosting
Does WPLift load fast for you? That’s because we use Siteground for hosting, WPLift readers can click here to get up to 60% off hosting for your site.

Disclosure: This page may contain affiliate links for which we will receive compensation if a purchase is made.

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Leave Yours +


  1. Lily

    I had follow all your steps, but what had happened is that I cannot access my blog.
    Warning: require_once(widgets/dp-twitter-widget.php) [function.require-once]: failed to open stream: No such file or directory in /home/username/public_html/wp-includes/functions.php on line 3699

    Fatal error: require_once() [function.require]: Failed opening required ‘widgets/dp-twitter-widget.php’ (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/username/public_html/wp-includes/functions.php on line 3699


    • lily

      i uploaded db-twitter-widget.php into public_html/wp-content/themes/europe/widgets. Is this correct? Then I copied the code into functions.php at the bottom of the script. Do i need to upload the plugin zip into wp-includes/plugins? I lost my blog. Help!

  2. When I activate the plugin, it turns all of my links links white in the admin screen. Also, how can we display the date/time of the tweet?Thanks.

  • Comments are Closed

Our Sponsors


Join our Newsletter to Receive 6 Free WordPress Themes

We will also send you our weekly Newsletter packed with the Latest WordPress Content.

We will look after your email & Never Spam!

You have Successfully Subscribed!