Change WordPress Default Email From Name

If you send emails from your WordPress site using the wp_mail() function you might of noticed that the email address...

Read More


How To Intercept 404 Errors In WordPress

When you go to a URL in WordPress it first needs to analyse this URL and decide what content it...

Read More


Run Code For Multisite On Plugin Activation

When you're developing a new plugin you may need to run some code on the activation of the plugin. For...

Read More


Change WordPress Database Prefix

As WordPress is an open source application all the database table names are known to everyone. If someone knows the...

Read More


Get WordPress Image ID By URL

In a recent project I needed to automatically assign a image to a post from a URL. This situation happened...

Read More


Get A WordPress Plugin File Path Or URL

In this code snippet we are going to look into how you get a full path of a plugin file....

Read More


Stop WordPress Automatically Adding br

WordPress uses a function called wpautop to automatically add paragraphs and line breaks to your content from the content editor....

Read More


WordPress Recent Posts Shortcode

On WordPress.com you automatically get are a large number of shortcodes that you can use on your blog. Here you...

Read More


Set WordPress Posts To Private By Default

The following code snippet will allow you to set all your posts to private as default. We do this by...

Read More


Disable Emojicons Introduced In WordPress 4.2

As of WordPress version 4.2 WordPress enabled the use of Emojicons in your posts, but in order to do this...

Read More


Function For Post Type Labels

WordPress has the ability to have different types of post types, the main post type you will use in WordPress...

Read More


Change Sortable Columns In WordPress

In a previous tutorial we saw how you can recreate the All Posts table in the WordPress admin area by...

Read More


Taxonomy Page Parent Menu Collapsed

WordPress allows you to create your own menus in the admin area, to do this you can use the function...

Read More


Programmatically Assign Menus To Theme Locations In WordPress

In this tutorial we are going to look at how we can programmatically set a menu to a menu location....

Read More


Login To WordPress With Email Address

By default WordPress will assign unique usernames to all users registered on the website. As they are unique there could...

Read More


Migrating WordPress Database To A New Server

When you are developing any website you will always have different environments for your website, the number of environments you...

Read More


Override Theme Template In Plugin

In this tutorial we are going to look at how you can override a theme template file from within a...

Read More


Display Submenu Only On Parent Page

The in-built WordPress menu system allows the content author to create a menu by a simple drag n drop interface,...

Read More


Change WordPress Email Content Types To HTML

All emails in WordPress are sent using the function wp_mail, the default content type for these email are in text/plain,...

Read More


Modify User Contact Fields In WordPress

With WordPress each user has their own profile records, within these profile there are multiple feeds that can be populated...

Read More


Get A List Of Registered Actions In WordPress

WordPress actions and filters is an event driven architecture that allow you to run specific code at certain times in...

Read More


Change Language Locale From WordPress Plugin

WordPress has the ability to be fully translated, this can be done in both themes and plugins. Translation Files To...

Read More


Display Content For Registered Only Users In WordPress

The registered users of your website are the most valuable visitors you can get on your website, these people are...

Read More


Remove Comments From Certain Post Types

In WordPress the default posts and pages both come with comments enabled, this will allow WordPress to display your comment...

Read More


Pre-populate Post Type Content

With custom post types you can separate the content into different section, for example you can post types, pages, portfolio...

Read More


Add Custom Post Types To RSS Feed

By default WordPress comes with an in-built RSS feed allowing your visitors to subscribe to your RSS feeds to be...

Read More


Get A List Of All Theme Page Templates

WordPress allows you to create custom page templates to use through out your site, using these page templates you can...

Read More


Force Sub Categories To Use Parent Category Templates

When doing WordPress theme development the first thing you will learn about is the template hierarchy, this is the order...

Read More


Remove Query String From Stylesheets In WordPress

A website owner should always be trying to improve the speed of their website as much as possible. In WordPress...

Read More


Sticky Posts In WordPress

As of WordPress version 2.7 you've been able to assign some posts to be sticky, a sticky post will make...

Read More


Redirect Users After Login In WordPress

WordPress comes with the ability to create different users for your website. Each of these users can have different roles...

Read More


Password Protected Pages Excerpt

When you display list posts in WordPress and want to display a snippet of the post content, there are two...

Read More


Hide Content on Password Protected Pages

On private websites it can be handy to have password protected pages to stop everyone getting at some pieces of...

Read More


Force WordPress To Check For Plugin Updates

A good feature of WordPress is the ability to automatically update plugins and themes with just a click of a...

Read More


Change The Password Protected Text In WordPress

One of the features that I've found content editors find really useful is the password protected pages in WordPress. This...

Read More


Style A Specific WordPress Menu Item

The following code snippet will allow you to style a specific menu item differently to the other items. When WordPress...

Read More


Get Title Of Post Outside The Loop

For theme developers it is important that your theme page displays the correct page title. There can be some confusion...

Read More


Access Database Outside Of WordPress

Sometimes I've needed to build a new page outside of WordPress but still have the ability to access the WordPress...

Read More


Debug WordPress Cron Jobs

In WordPress you can setup scheduled tasks that allow you to run a certain action at a scheduled time in...

Read More


Change Default Theme For WordPress Multisites

When you create a new site in WordPress multisite it will automatically assign a theme to the new site. It...

Read More


Remove Protected: From Post Titles

In WordPress you can easily password protect a page from the admin area. All you have to do is under...

Read More


Trim Post Content Outside Of Loop

The WordPress loop is used in the theme files to display the post content, when you are inside the loop...

Read More


Stop WordPress Including jQuery Migrate File

In WordPress version 3.6 when WordPress loads the built in jQuery file it will also load in the jQuery migrate...

Read More


Display Menus When Location Is Assigned

In WordPress the user can create their own menus in the CMS area by just going to Appearance -> Menus....

Read More


Automatically Link Twitter Usernames In Content

If you mention people in your WordPress posts or link to your own Twitter profile in a post you can...

Read More


List Of Pages Using A Page Template

There are a few differences between using pages or posts, one of the biggest difference between these post types are...

Read More


Get All Menu Items In WordPress

In previous project I had to display a list of categories in a certain order, to get the categories out...

Read More


Get Theme Directory In WordPress

When you doing theme development there are times when you need to reference a file in the same folder of...

Read More


When the_content() Ignores More Comment

In WordPress there is a special HTML comment called more. <!--more--> This comment allows you to put a stopping point...

Read More


Remove Blog Prefix For Custom Post Types

This is a problem I've seen a couple of times and it sometimes tricks people out of using custom post...

Read More


Hide WordPress Update Notice To All But Admins

When you have built your site on an open source project like WordPress one of the benefits you get is...

Read More


Get Database Table Prefix In WordPress

If you are using WordPress multisite then depending on what blog you are using the database table prefix will be...

Read More


Remove Column On Pages Table In WordPress

When you install some plugins they may add additional columns to the posts and pages table. Just like the Yoast...

Read More


Get Current Plugin URL

During WordPress plugin development you will need to include any Javascript or CSS files used by plugin inside the plugin...

Read More


Remove Plugins From Plugin Screen

If you are creating a WordPress site for a client you could install a load of useful plugins for them,...

Read More


Multi Environment WordPress wp-config.php

When you are developing any website you will always have different environments for your website, the number of environments you...

Read More


Set Minimal Comment Limit In WordPress

The reason for comments being turned on a blog is to add more in-depth discussion to a certain post. But...

Read More


Force SSL On Certain WordPress Pages

There are going to be certain pages that you want to force SSL, so that the browser will redirect you...

Read More


Check If A Sidebar Has Widgets Assigned

To display a sidebar in your WordPress site you first need to register the sidebar so that WordPress can assign...

Read More


Add Custom Image Sizes Into Media Library

In a previous code snippet we found about how you can define new custom images sizes to use on your...

Read More


Restrict Admin Area To Only Admin Users

When you create a new user in the WordPress user manager they will be able to login to your site...

Read More


Set Remember Me To Be Always Checked

The WordPress login page has a checkbox that allows you to always be remembered when you login to WordPress. If...

Read More


Add Category RSS Feed Link

When you have a WordPress site you can assign different posts to categories, this allows you to group your posts...

Read More


Get All Categories In WordPress

There are times when you want to get a list of all the categories of your WordPress site, this is...

Read More


Get The Current Post Type In WordPress

I recently had to make a theme that used similar code on different custom post types. For this I want...

Read More


Remove Width And Height Attributes From Images

Whenever you upload an image using the WordPress media library and add this image to your post, WordPress will automatically...

Read More


Enable Additional Buttons On Visual Editor

The default text editor in WordPress is TinyMce, with this you get lots of additional features. It allows your content...

Read More


Increase WordPress Memory Limit

A common error you can come across in WordPress is a PHP memory limit error. This happens when WordPress doesn't...

Read More


Redirect To Post If Search Results Return One Post

Wordpress has a built in search functionality which allows your visitor to easily search for posts on the blog. It...

Read More


Get Current Page Template

Sometimes in WordPress development you will need to display certain theme files, using the rewrite engine. For example using custom...

Read More


Custom CSS On Single Posts

In a previous tutorial you would of learnt how to attach extra data to your single posts by creating custom...

Read More


Set Minimum Word Count On Posts

Since Google Penguin has been released there is more of need to create pages which are full of content. What...

Read More


Change Posts Labels In WordPress

Now that WordPress has all the capabilities you need from a CMS, many people say that they want WordPress to...

Read More


Default Scripts To Use In WordPress Development

There are a number of different default stylesheets and Javascript files which comes with your core WordPress install. These can...

Read More


Disable Changing The WordPress Theme

The problem with having a multi-author blog is that you have a lot of users which have access to the...

Read More


Add New Menu Items To WordPress Admin

If you are a plugin or theme developer then you will get to the stage where you need to add...

Read More


Create A Helpful WordPress 404 Page

When your server can't find the requested page it will return a HTTP status code of 404. This tells the...

Read More


Disable File Edits In WordPress Admin

If a user has access to your WordPress admin area then they will have access to all the files which...

Read More


Make Content Clickable In WordPress

Wordpress has a great feature I've just discovered which allows you to convert plain text into links for URLs or...

Read More


Remove Default WordPress Image Sizes

When you upload an image to WordPress by default it will be converted to three different sizes. Thumbnail Medium Size...

Read More


How To Remove WordPress Post Meta Boxes

On the WordPress post screen there are a number of meta boxes which give you options to attach to the...

Read More


Add rel=”nofollow” To WordPress Comment Reply Links

When using WordPress comments you can easily reply to a comment directly on the page by clicking on a reply...

Read More


Get WordPress Theme Information

When you create a WordPress theme you need to add comments to the top of the stylesheet so that WordPress...

Read More


Change WordPress Upload Mime Types

In the current WordPress install you are allowed to upload the following file types. You are only able to upload...

Read More


Disable WordPress Version Update Message

Every couple of months WordPress will release a new version of WordPress which improves on the previous version. You should...

Read More


Run Function After WordPress Plugin Activation

When you are creating a WordPress plugin there are some things you may need to do when the users activate...

Read More


Create Cron Jobs In WordPress

A cron job allows you to automatically set a function to run at a set time or interval. WordPress comes...

Read More


Automatically Set Post Featured Image

A post featured image was introduced in WordPress version 2.9, it is a thumbnail that can be set to the...

Read More


Create Custom Image Sizes In WordPress

When you upload an image to WordPress it will automatically convert the same Image to multiple sizes while still keep...

Read More


Change The Enter Title Text For Custom Post Types

Since discovering WordPress custom post types I've always wanted to customise the WordPress dashboard area. Your able to do this...

Read More


Add Additional Links To The WordPress Plugin Admin

Here is a useful snippet submitted by SHelfinger.EU. When you activate a plugin in WordPress the author can place links...

Read More


Change The Amount Of WordPress Post Revisions Stored

WordPress has a autosave feature which will automatically save a revision of your post as you are typing. But the...

Read More


Display The Number of Database Queries In WordPress

When you are preforming maintenance on a WordPress blog one of things you need to check for is the speed...

Read More


Add Search Form To A WordPress Menu

Wordpress comes with the functionality to create menus in the dashboard area, from here you can select pages or custom...

Read More


How To Exclude Posts From WordPress Search

There may be times when you have a little rant of make a mistake in a post and want to...

Read More


Secure wp-config.php File With htaccess

Your wp-config.php file stores all of your config variables for your WordPress site. If someone has access to this file...

Read More


Automatically Create Meta Description From Content

Meta description tags are still very much used by search engines, they provide the default text to be displayed in...

Read More


Display The Post Date In WordPress

If you are building a WordPress theme then there will a time when you want to display the date for...

Read More


Display Text To Only Logged In WordPress Users

You can use this to post advice or reminders to logged in users when they need to perform different tasks....

Read More


How to Remove Default WordPress Widgets

By default WordPress comes with a number of different in-built widgets which allow you to easily add additional functionality to...

Read More


Display Email Addresses In WordPress

There are loads of spam bots crawling the web looking for people who display their email address on web page...

Read More


Display Categories Of A Custom Post Type

When you are using custom post types they some people get confused to how they function, some people think they...

Read More