A collection of kick butt WordPress centric code snippets. 100% tested.

Get current page URL in WordPress

Here is a handy snippet with which you can easily get current page URL on ...

Read Article →

Working with other plugins – The right way to customize

Check out the finished plugin for this tut. It’s very common for developers ...

Read Article →

Login Page Branding

The easiest way to make changes to the WordPress login page is to add some ...

Read Article →

Count the number of approved comments for a post

Recently I came across an issue where I needed to come up with an easy ...

Read Article →

Insert a sidebar in page content with shortcode

Recently I was tasked with a problem where I wanted to have a page that ...

Read Article →

Add extra security to your plugins

Add the if statement just below your plugin info section to better secure your plugins. ...

Read Article →

Update WordPress settings and options

Add this to your child theme's functions.php file. Hooked into WordPress makes this little wpsnipp.it ...

Read Article →

Comment Your Code

This is a header style comment, it would be placed ABOVE your custom function. Place ...

Read Article →

Get post-type info

This wpsnipp.it checks if the post-type passed in is of a certain type. This is ...

Read Article →

Enqueue files to a specific admin page

Instead of enqueueing files on every page load, you can use this wpsnipp.it to load ...

Read Article →