While working or setting up the WordPress blog it often comes the time when you got puzzled on thinking and even (most of the time) wondering that if I have some easy trick with me by which I can let mine work done instantly. At that time you would be requiring some short codes (or snippets) which can make your work easier and faster. With this article, I will be sharing a collection of 10 most required WordPress snippets that will work for you in making your life while using WordPress better.


Disable Google Analytics for logged in users

Like any other website on internet, you too want to use Google Analytics only for tracking real visitors and not your website’s authors or writers. Using the following snippet will automatically adds the Google Analytics code to your wp_footer() area in your functions.php file, means you don’t have to manually add up the Analytics code to all of your website files.

Include Future Posts in RSS Feed

Adding the snippet to your theme’s functions.php file will let you appear your future posts in your RSS feed.

Remove Gallery Settings

Gallery setting often make you irritated. The following snippet will simply remove all the gallery settings from the media upload section. All you have to do is simple add the code in your functions.php file.

Hide admin ‘help’ tab

Seeing the ‘help’ tab all the time in the top right corner of the WordPress admin area will be a devastating experience for your clients. In order to let avoid such conditions on not to happen for them, simply add the following snippet in your functions.php template.

Get top level categories / taxonomy

The following code will allow you to get the top level categories and taxonomy.

Dynamic copyright text

Just on your way to launch your website and thinking on what would be the best copyrighted text to place in footer. The snippet below allows you to create an amazing copyright text for your footer by automatically updating the date using the the_date() function. Just add the code in to your footer.php file.

Redirect to URL from Title

Running a blog or a magazine and felt like a need arise in which you want to redirect your readers to a URL from title. You do think of a condition in which you can either use a plugin or simply use some code.

To help you out and reducing your workload over this, all you need to do is to add a custom filed called “redirect” with the URL you want to redirect at as value. This means now when your reader click on certain title on your page, they will be redirected to your desired URL.

Remove Private/Protected from Post Title

The time when a post’s visibility is either Password protected or Private, the snippet removes the description before the post title.

Automatically Notify Your Members on New Posts

Placing the following snippet into your functions.php file will allow you to send an email to all registered users as soon as post is published.

Login / Logout link

The following snippet can add login and logout link.

Detect user from Google

The time when users found your WordPress site at Google, the following snippet will give special greetings to all the users.

Create a new Page

The snippet will allow you to create a new page on its own. The code could be used to create a POST, all require is to change the value for “post_type.”

Change Login Logo URL

The one brand advantage of using WordPress is that you can change the login logo from the default WordPress logo to your own brand, but with the use of following snippet, you will get more freedom by changing the link that the logo points to. Add the code to functions.php template.

Show Tag Cloud

You can use the tag cloud to either of your sidebar, footer or elsewhere. Add the following snippet and you tag cloud is ready to display.

Automatically Activate Plugins

The code can activate the plugins automatically via the wp-config.php.

Change version in WP-Admin footer

The snippet will let you change the version string in the bottom-right of the WP admin pages.