WordPress

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...

in WordPress

Change WordPress Database Prefix

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

in WordPress

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...

in WordPress

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....

in WordPress

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....

in WordPress

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...

in WordPress

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...

in WordPress

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...

in WordPress

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...

in WordPress

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...

in WordPress

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...

in WordPress

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....

in WordPress

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...

in WordPress

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...

in WordPress

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...

in WordPress

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,...

in WordPress

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,...

in WordPress

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...

in WordPress

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...

in WordPress

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...

in WordPress

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...

in WordPress

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...

in WordPress

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...

in WordPress

Add 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...

in WordPress

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...

in WordPress

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...

in WordPress

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...

in WordPress

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...

in WordPress

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...

in WordPress

Password Protected Pages Excerpt

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

in WordPress

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...

in WordPress

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...

in WordPress

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...

in WordPress

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...

in WordPress

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 WordPress

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...

in WordPress

Debug WordPress Cron Jobs

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

in WordPress

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...

in WordPress

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...

in WordPress

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...

in WordPress

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...

in WordPress

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....

in WordPress

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...

in WordPress

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...

in WordPress

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...

in WordPress

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...

in WordPress

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...

in WordPress

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...

in WordPress

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...

in WordPress

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...

in WordPress

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...

in WordPress

Get Current Plugin URL

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

in WordPress

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,...

in WordPress

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...

in WordPress

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...

in WordPress

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...

in WordPress

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...

in WordPress

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...

in WordPress

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...

in WordPress

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...

in WordPress

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...

in WordPress

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...

in WordPress

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...

in WordPress

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...

in WordPress

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...

in WordPress

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...

in WordPress

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...

in WordPress

Get Current Page Template

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

in WordPress

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...

in WordPress

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...

in WordPress

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...

in WordPress

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...

in WordPress

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...

in WordPress

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...

in WordPress

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...

in WordPress

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...

in WordPress

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...

in WordPress

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...

in WordPress

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...

in WordPress

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...

in WordPress

Get WordPress Theme Information

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

in WordPress

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...

in WordPress

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...

in WordPress

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...

in WordPress

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...

in WordPress

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...

in WordPress

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...

in WordPress

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...

in WordPress

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...

in WordPress

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...

in WordPress

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...

in WordPress

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...

in WordPress

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...

in WordPress

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...

in WordPress

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...

in WordPress

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...

in WordPress

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....

in WordPress

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...

in WordPress

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...

in WordPress

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...

in WordPress