Theming Your WordPress Dashboard: Duplicate, Reorder & Exclude Custom Post Types

Themeing Your WordPress Dashboard

A key to leveraging your dashboard is understanding the power of the Custom Post Type. This post covers how you can easily duplicate or re-order your post types, or exclude them from search results.

Custom Post Types are one of the largest parts to the WordPress Ecosystem. Almost every theme or plugin, with the exception of a few, will more than likely add a custom post type to your WordPress Dashboard.

WordPress can hold and display many different types of content. A single item of such a content is generally called a post, although the post is also a specific post type. Internally, all the post types are stored in the same place, in the wp_posts database table, but are differentiated by a column called post_type.

So what the heck are Custom Post Types and what do they do?

Custom Post Types are essentially a way to separate your sports posts from your news posts.

Think of it like this. You have a bucket. All of your blogs, sports and news posts go into the same bucket. You are then asked to sort the three different kinds of posts by their category. One by one you pull each post out to determine which category it belongs to.

Wouldn’t it be easier to put each type of post into their own, separate, bucket?

Welcome to Custom Post Types.

There are five post types that are readily available to users or internally used by the WordPress installation by default:

  • Post (Post Type: ‘post’)
  • Page (Post Type: ‘page’)
  • Attachment (Post Type: ‘attachment’)
  • Revision (Post Type: ‘revision’)
  • Navigation menu (Post Type: ‘nav_menu_item’)

To make the WordPress dashboard easy to use, it was easier to call pages by another name than “posts part two” or “even more kinds of posts.” In the eyes of WordPress, no matter how you slice and dice them, all posts are considered as a “post.”

Let’s say that you bought a fancy new Corporate WordPress Theme. After installation of the theme, you notice that there are two new menu items in your WordPress Dashboard Menu Bar. They are named “Staff Members” and “Services.”

These are two new custom post types. Instead of creating a new post in the “Posts” section and assigning that post to a category called “Staff Member,” the theme developer has created a new post type for you to list all of your employees.

This is really handy for you as an Admin, and allows your theme developer to have more freedom in how they design these pages.

Now that you understand Post Types, what can you do with them? For starters, you can duplicate them, re-order them, or exclude them from search results.

Notice: Before you install a plugin, or make any kind of changes to your live WordPress website, please make a backup of your site first. We don’t want you to lose any posts in your Custom Post Types. We also recommend testing new themes and plugins on a staging or local environment first — like with DesktopServer.

Duplicate Post

[wp-pic type=”plugin” slug=”duplicate-post” layout=”large” ]

Unless you are a small WordPress Plugin Development shop, chances are you will be creating many staff members with very similar content. There may be only a few differences between the employees, such as their name, email, and phone number. You could just copy the post content and paste it into a new post. That’s fairly easy to do.

An easier way of duplicating a post is by using a plugin called, you guessed it, “Duplicate Post.” This plugin has very few options that you will need to configure in order to get the maximum benefit.

The options are easy to understand and use. When you duplicate a post, would you also like to inherit that particular post’s “Published Status?” There’s an option for that. When you duplicate a post, would you also like to inherit the attachments? There’s a setting for that. Like I said, these are easy to use directions.

Imagine that you have a product. You want to duplicate that product and change the price. With this plugin, you can do that. You can also copy the free white paper download that comes along with a new user registration. Pretty neat right? Wait, it gets better…

With the Duplicate Post plugin, you can specify that only Administrators or Editors can duplicate a post.

Other features include:

  • Copy post/page date also – Normally, the new copy has its publication date set to current time: check the box to copy the original post/page date
  • Copy post/page status – Copy the original post status (draft, published, pending) when cloning from the post list.
  • Copy excerpt – Copy the excerpt from the original post/page
  • Copy attachments – Copy the attachments from the original post/page
  • Copy children – Copy the children from the original post/page
  • Exclude these fields
  • Exclude these taxonomies
  • Select the taxonomies you don’t want to be copied
  • Title prefix – Prefix to be added to the original title, e.g. “Copy of” (blank for no prefix)
  • Title suffix – Suffix to be added after the original title, e.g. “(dup)” (blank for no suffix)
  • Select Roles allowed to copy

Post Types Order

Duplicating a post can be very beneficial. Less work equals more productivity. The problem with duplicating a post is that the newest post always shows up on the top of the list. There are many ways to rearrange your posts into the correct order that you want.

Custom Post Type Edit Date
How to change the date on a post or a page inside of WordPress

How to change the date on a post or a page inside of WordPress.

One of the easiest ways to shuffle the order of your posts involves changing the “Published on” date. WordPress, by default, allows you to edit the date and time that a page or post is published on. WordPress will always use today’s time and the date by default.

Fun Fact: You can also use this feature to schedule a post to appear in your blog on a specific date.

[wp-pic type=”plugin” slug=”post-types-order” layout=”large” align=”center” clear=”after” ajax=”yes” ]

In the case of Custom Post Types, more often than not, they are not date-specific and you want them ordered in an entirely different manner. Take the “Staff Members” example from earlier. Ordering by date really doesn’t make much sense in that case.

If you are looking for an even easier way to re-order your posts, allow me to introduce you to another awesome plugin. It’s called Post Types Order.

This plugin simply creates a new menu item for each post type called Re-Order. The Re-Order settings page gives you a simple drag and drop interface to re-order your posts into the order that you desire.

This video to explains more.

Reordering Custom Post Type Posts In WordPress

Quick video showing you how you can re-order your posts in a custom post type using the awesome Post Type order plugin.

Disclaimer: If you are displaying your posts by using a custom query (in the theme template) or by using a shortcode to display posts in a specific order, this plugin will not override that at all.

Search Exclude

One of the things that we have not discussed in this article is the use for custom post types. Not all post types are displayed on the front end. The plugin Awesome Support is an ideal candidate for this. Awesome Support allows users to create a support ticket on your site.

If you run a small company or an I.T. company, support tickets are almost a must have. Each support ticket is considered a post because it is added to a custom post type, or bucket, called Tickets. While that’s OK, you wouldn’t want to allow anyone, passing by your site, to search for these tickets.

Since the tickets are in a post type, WordPress will include these posts on a search results page.

Let’s say that you use a search widget in a sidebar on your blog posts. If someone were to search for “Computer Problems,” WordPress will search for every post that has “Computer Problems” in the title, tags, category, etc. If a match is found, WordPress will include them in the search results. This would include any of the support tickets from Awesome Support, unless you exclude them.

So how do you exclude a post from being listed in search results?

Search Exclude Custom Post Type
Search Exclude adds a custom setting, in the sidebar of your post edit screen, to exclude a post from search results.

[wp-pic type=”plugin” slug=”search-exclude” layout=”large” align=”center” clear=”after” ajax=”yes” ]

Search Exclude adds a custom setting in the sidebar of your post edit screen, to exclude a post from search results.

I’m glad you asked. The last plugin that I want to discuss is called Search Exclude.

With this plugin you can exclude any page, post or whatever from the WordPress search results by checking off the corresponding checkbox on post/page edit page.

If you are using custom post types to store information, keep track of invoicing, organize inventory or to allow support tickets, I would definitely recommend that you exclude them from search results.

You could always Password Protect your posts or pages. That does work in most cases. However, there is the potential that a plugin could remove that feature. Leaving your posts open to anyone passing by.

Search Exclude is just another safety precaution tool that you can use to ensure that your posts will, in fact, be hidden from the public.

How Do You Manage your Post Types?

You should now have a great understanding of how Custom post Types can be used to enhance your WordPress Website. How do you plan on using one of these plugins with your WordPress site?