When to use wp_remote_head vs wp_remote_get

When to use wp_remote_head instead of wp_remote_get

In a previous post, we discussed the differences between wp_remote_post and wp_remote_get.  In this post we would like to look at another routine that wasn’t discussed, that of wp_remote_head. The Body Response When you make a request in a web browser, you are providing a URL plus any optional query params.  The browser receives the […]

wp_remote_get vs wp_remote_post

Differences between wp_remote_get and wp_remote_post

If you write plugins for WordPress that are shared with the public, you need to take extra caution when working with 3rd party APIs and endpoints.  One such caution is avoiding the usage of the function file_get_contents to retrieve information.  In fact, if you intend on submitting a plugin to the WordPress directory, they will […]

Custom Database Version Strings

Saving a custom database version string for your WordPress plugins

When developing custom WordPress plugins that interact with the Database, there can be situations when you want to track your own “version” number of your plugins database interactions.  However, there are some caveats and performance considerations that need to be taken into account when implementing this code.  In this post we want to share how […]

Removing the View Link on Custom Post Types

Remove the admin “view” link on Custom Post Types

There are occasions when you want to create a custom post type in WordPress, but don’t want to have an associated view page with it.  Maybe the details in the custom post type are being included via a shortcode or maybe they are for internal purposes only. WordPress gives you options to control the public […]

add_option vs update_option

WordPress add_option versus update_option

In a previous post we detailed the steps to use add_option, get_option and update_option to save and interact with custom settings in the WordPress database.  In this post we want to dive a little deeper into the differences between add_option and update_option. The add_option example: The update_option example: There are pro’s and con’s to both […]

Custom WordPress Settings

Creating, Saving and Retrieving Custom WordPress Plugin Settings

When you create a custom plugin in WordPress, there will be times when you need to save unique settings or preferences for the plugin installation.  These are settings that cannot be hardcoded into the plugin files because they will be unique to each installation of the plugin.  In addition, these are not settings that are […]

Creating a shortcode in WordPress

Creating Custom Shortcodes

Shortcodes within WordPress are a great and flexible way to include common content across multiple locations.  Let’s suppose for a minute that you have a standard piece of information that needs to be displayed across many posts in your WordPress site.  You could put that content into a single post and then reference that post […]

Adding Custom Editor Columns

Adding a Column to the Admin Editor of Custom Post Types

Here is the scenario – you have created a custom post type that adds all kinds of extra bells and whistles.  You now want a piece of data for the custom post type to be displayed on the editor page.  This tutorial will walk you through how to include that. There are three main steps […]

Redirect Example

Forcing www subdomain when www is not entered in MultiSite

When you are setting up WordPress MultiSite, a common problem often run into is around Domain Mapping.  Let’s look at an example using our domain here of WPDevHub.com. In reality – we actually have multiple domains that users may enter in their browser to access our site.  The most common are the inclusion and exclusion […]