12 Useful Twitter Hacks and Snippets For WordPress

written by aext on October 15, 2012 in Tools and Web Development with no comments

Everybody loves twittering these days. Don’t believe me? The statistics should make you a believer. As of 2012, Twitter had 500 million active users! The 140 character post social media platform is ruling the world, second only to Facebook. Considering the huge number of Twitter users, people are using Twitter options like plugins and add-ons on more and more websites.

These plugins and add-ons can have varied uses and applications. For example, some commenting systems like Discus allow you to post a comment with your Twitter picture being displayed in the comment as your Avatar. This helps you not to upload your display picture again and again whenever you want to comment and hence saves a lot of time. See entry #3 below for more on this.

Or maybe you want your blog posts’ links to become tiny so that your readers may share them on Twitter. As we all know…Twitter has a 140 character limit. Under such a constraint it is not a wise practice to share large URLs on Twitter as you will want some room to type out some text relevant to the link in your tweets to tell your followers about what you are sharing. Option #7 below enables you to achieve this.

There are 10 other options below that combine the technology of WordPress and Twitter to produce great results. Check them out by scrolling down.


1. Different content for Mac and Win

UTHASFWP 01

2. Track post views without a plug-in using post meta

Add this snippet into the functions.php of your word press theme.

UTHASFWP 02

3. Twitter Avatars In Comments WordPress Plug-in

UTHASFWP 03

4. How to remove menus in WordPress dashboard

Simply paste the following code into the functions.php file of your theme. The following example will remove all menus named in the $restricted array.

UTHASFWP 04

5. Display your latest twitter entry on your WP blog

To display your latest twitter entry, just paste the code below anywhere on your blog.

UTHASFWP 05

6. Remove Pages Columns

How to remove a column from the pages page.

UTHASFWP 06

7. Automatically provide tinyurls for your WordPress blog posts

To achieve this recipe, simply open your functions.php file and paste the following code.

UTHASFWP 07

8. How to redirect to single post page if there is one post in category or tag

Archive indexes are a good way to organize your posts, but if there is only one post in an archive page it can be just a waste of time. Here i will give you a small #snippet to jump directly to the post page.

UTHASFWP 08

9. Display search terms from Google users

If a visitor reached your site through Google’s search, this script will display the terms they searched for in order to find your site. Put this code where you want to display the message.

UTHASFWP 09

10. Disable submenus from Admin Panel

This snippet disables submenus, like Themes and Writing, from the Admin Pane.

UTHASFWP 10

11. Display number Face book Fans

If you want to display the number of your Face book Fans then use this code.

UTHASFWP 11

12. WordPress Admin Tidy D
ashboard Widgets By Role

UTHASFWP 12

I hope you found something of value in the above collection. Let me know in the comments below which of the above you liked the most?