Using WordPress Custom Fields to Enhance a Plugin


The WordPress plugin ecosystem is amazing. It offers us an almost endless variety of functionalities that we can add to our websites with minimal effort.

There are cases, however, when a plugin does about 95% of what we need. Or perhaps it has all the functionality we were hoping for, but could benefit from an extra bit of personalization.

While we could accept any shortcomings and leave well enough alone, that’s not the WordPress way! Instead, we can use the incredibly-flexible WordPress custom fields to help us fill in what’s missing.

Today, we’ll explore some benefits of integrating custom fields into our favorite plugins. Then, it will be time to dive into a real-world example that demonstrates what can be accomplished.

What WordPress Custom Fields Do

The main role of custom fields is to add extra data to a WordPress post, referred to as “metadata”. This is essentially information that goes beyond the default data included with a page, post or even a plugin.

What kind of metadata can be added? Pretty much anything you can imagine. Text, HTML and URLs are common examples. However, you might also add object data from files or posts. Then there is also the possibility of using custom fields as settings that allow you to perform various functions conditionally (if this, then do that).

Custom fields provide some useful benefits:

Adding Highly-Customized Data

When building a website, custom fields provide a way to standardize specific pieces of niche data. That is, data which is unique to a company or organization.

As an example, let’s think of an employee profile. There are a number of different items we might want to include for each person:

  • Name;
  • Title;
  • Photo;
  • E-Mail Address;
  • Biography;

Using custom fields, we can create this standard set of data for each employee. To take things a step further, we might even create a custom post type called “Employees”, in which each post contains these fields.

A User-Friendly Interface – With Some Help

Admittedly, the custom fields UI that comes with WordPress is lacking in a number of areas. But the developer community has created some compelling solutions in the form of custom field plugins.

These plugins help create a much more user-friendly interface and add tons of amazing functionality. Among the most popular are Advanced Custom Fields (which we’ll use in our example below), CMB2, Meta Box and Pods Framework. While there are some similarities throughout, each plugin has some unique benefits that are worth looking into.

Whichever you choose, you can expect a big improvement over the default UI. They’ll make the content creation process that much more intuitive.

Adding Pizzazz to Plugins

Now that we understand the benefits of using WordPress custom fields, let’s talk about how they relate to plugins. Chances are, many of the plugins you have installed on your website already



This article was written by Eric Karkovack and originally published on WPShout.

Disclosure: Some of the links in this post are "affiliate links." This means if you click on the link and purchase the product, We may receive an affiliate commission.

Leave a Comment

You have to agree to the comment policy.

Show Your ❤️ Love! Like Us
Scroll to Top