Display Post Meta Box On Specific Page Templates

In WordPress you have the ability to create different post types to hold different content, along with the create different post types you can also add new content fields attached to the posts themsel...

Change Default WordPress Emails

One of the best things about WordPress development is that not only can you use it as a CMS but as an application framework, it comes with a huge selection of utility functions that make it easy to ha...

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 creates a menu it will use the menus setup in the WordPress admin, this interface...

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 in theme developer when they are working on a static page that is being used to d...

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 database from this new page. This would normally use custom tables you've created. To...

Debug WordPress Cron Jobs

In WordPress you can setup scheduled tasks that allow you to run a certain action at a scheduled time in the day. As this runs a set action you can perform a number of tasks at the same time. To setup...

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 does not use the theme that you have activate on the other sites or on the network setup but...

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 the publish block edit visibility and select password protected. A textbox will appear and you can...

Override Parent Theme Functions

Child themes is functionality that allows you to inherit the templates and functions of another theme. Using the child theme to can inherit all the styling of the parent to make small changes to the d...

Programmatically Add Menu Item

WordPress comes with a default menu system which gives full control to the admin user of the site to change or create as many menu items as you want. To access the menu system in the admin area you ju...

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 there are two main methods you can use to display the content. You can either display all the co...

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 file. The jQuery migrate file was introduced in version 1.9 of jQuery, it is used to load...

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. From this page you can then assign these menus to locations in the theme by choosing the theme...

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 use the following code snippet to automatically asd a link around the Twitter username which will li...

Add TinyMce Editor To Category Description

In WordPress by default there are two ways to organise and group your posts, you can either group them by tags or by categories. On both of these taxonomies you can customise the name, slug and descri...