Custom Post Types

he ability to organize elements of WordPress custom post types using folders is similar to the media library, standard posts & pages. Here’s why leveraging custom post types in WordPress can significantly enhance your website’s functionality and user experience:

  • Custom post types allow you to segregate diverse content types, ensuring a tidy and structured website.
  • By employing custom post types, visitors can effortlessly locate specific content on your site, streamlining their search experience.
  • Custom post types can positively impact your site’s search engine rankings, boosting visibility and attracting a wider audience.
  • They facilitate the creation of uniform, structured content, especially in collaborative environments where multiple contributors are involved, maintaining a cohesive look and feel throughout your website.

Utilizing custom post types empowers you to elevate your WordPress website, making it more engaging, user-friendly, and effective in achieving your desired goals.

Create Custom Post Types and Enable Folders for Them

The process of creating custom post types in WordPress can be done in two different ways: using a plugin or manually. These methods cater to different skill levels and user preferences. In our case, we will use the second method.

Let’s embark on a step-by-step journey to manually create a custom post type on your WordPress site, unlocking a world of possibilities for content customization and management.

How to Create Custom Post Type?

  1. Navigate to your theme’s directory and open the functions.php file.
  2. Add the code below to the function.php file.
/* My Custom Post Type Begin */
function create_my_customposttype() {
			'labels' => [
				'name' => __( 'Events' ),
				'singular_name' => __( 'Event' ),
				'add_new' => __( 'Add New Event' )
			'public' => true,
			'has_archive' => false
add_action( 'init', 'create_my_customposttype' );
/* My Custom Post Type End */
  1. After adding the above code, a new post type “Events” should appear in your WordPress menu.
  1. Let’s create some events.

How to Enable Folders for Custom Post Type?

  1. Go to the MediaCommander settings
  2. Open the “Permissions” tab
  3. Add a new folder type as shown in the video below
  1. After these actions you will be able to create folders for its items in the “Events” list.

As result we can create folders for our custom post types, we can categorize and group similar content together, making it more efficient to manage and update your site. This is especially useful if you have a large number of custom posts or plan to expand your site’s content in the future.