How to Create a Custom Post Type and Enable it for Elementor in 2 Simple Steps

Hello WordPress users! Today, we are going to dive into the process of creating a custom post type and enabling it for Elementor. This will open up a new realm of content possibilities for your website. Ready to get started? Let’s jump in!

Step 1: Create a Custom Post Type

The first step is to create a custom post type. This can be done with a bit of PHP code in your theme’s functions.php file.

Navigate to your WordPress theme’s folder (usually wp-content/themes/your-theme-name) and open the functions.php file. Add the following code to the bottom of the file:

				
					function create_custom_post_type() {
    register_post_type('my_custom_post',
        array(
            'labels'      => array(
                'name'          => __('My Custom Posts', 'textdomain'),
                'singular_name' => __('My Custom Post', 'textdomain'),
            ),
                'public'      => true,
                'has_archive' => true,
        )
    );
}
add_action('init', 'create_custom_post_type');

				
			

This code creates a new post type named “My Custom Posts”.

Step 2: Enable the Custom Post Type in Elementor

Now that we’ve created our custom post type, we need to make it compatible with Elementor.

  1. In your WordPress dashboard, go to Elementor > Settings.
  2. Navigate to the ‘Post Types’ section.
  3. You will see a list of all the post types available on your site. Check the box for ‘My Custom Posts’.
  4. Click on the ‘Save Changes’ button.

And that’s it! Your custom post type is now enabled for Elementor and you can start creating custom designs for it.

By following these steps, you’ve added a new layer of customization to your WordPress site. Now, you can create unique designs for your custom post type using Elementor. Enjoy exploring this new aspect of your website’s design capabilities!

Table of Contents

Pro Feature

When to Use This Feature

Use Examples