Subscribe On YouTube

Join other subscribers and enjoy other Divi video tutorials!

How To Hide The Divi Projects Custom Post Type From Your Dashboard

Nelson Miller Profile Orange
In this tutorial I will show you how to hide the default Divi Projects custom post type that comes by default with Divi from your dashboard.

Clean Up The Dashboard

The Divi Theme come with its own custom post type called “Projects,” which is designed to integrate with the Portfolio and Filterable Portfolio modules. While this feature is helpful for anyone using those modules, it typically is not necessary for most websites. Seeing this post type in the WordPress dashboard can be confusing for some users, and it may be a good idea to disable it and hide it from view. In this tutorial, I will show you how to hide the default Divi Projects custom post type that comes by default with Divi from your dashboard for a cleaner user experience.

▶️ Please watch the video above to get all the exciting details! 👆

Add A PHP Code Snippet To Your Site To Disable The Projects Post Type Menu

To disable the default Divi Projects custom post type from cluttering your WordPress dashboard, you can use the PHP code snippet below. We have instructions below for where to paste PHP code if you are not familiar with it. Just remember to be careful, as PHP can cause issues if not implemented properly. After adding this snippet to your site, you can refresh the dashboard and the Projects menu will be hidden.

Where To Paste The PHP Code

1. Divi Assistant
If you are using our Divi Assistant plugin, simply paste the code in the PHP tab in the custom code window in the Divi Visual Builder.

2. Child Theme
If you are using a child theme, paste this code into the functions.php file. If you don't have a child theme, you can generate a child theme directly on your site or download our free child theme.

3. Code Snippet Plugins
Otherwise, install a dedicated code snippet plugin, create a new snippet, and paste this code into the PHP code editor.

If you need help understanding where to paste the code, please check out our complete guide about where to add custom PHP code snippets in Divi.

/**
 * Modify arguments for the 'et_project' post type to hide it from various parts of the WordPress interface.
 *
 * @param array $args The original arguments for the 'et_project' post type.
 * @return array Modified arguments for the 'et_project' post type.
 */
function pac_hide_project_posttype_args( $args ) {
    // Set 'public' argument to false to hide the post type from the front end.
    $args['public'] = false;

    // Set 'exclude_from_search' argument to false to prevent the post type from appearing in search results.
    $args['exclude_from_search'] = false;

    // Set 'publicly_queryable' argument to false to prevent direct querying of the post type from the front end.
    $args['publicly_queryable'] = false;

    // Set 'show_in_nav_menus' argument to false to prevent the post type from appearing in navigation menus.
    $args['show_in_nav_menus'] = false;

    // Set 'show_ui' argument to false to hide the post type from the admin interface.
    $args['show_ui'] = false;

    // Return the modified arguments.
    return $args;
}

// Add filter to modify the arguments for the 'et_project' post type.
add_filter( 'et_project_posttype_args', 'pac_hide_project_posttype_args', 10, 1 );

Code Explanation

This code snippet essentially tells WordPress to hide the Projects custom post type completely. The code snippet not only hides the menu item for the Projects custom post type in the dashboard, but also effectively removes it from existence as far as the front end of the website is concerned. By setting the ‘public’ parameter to false and adjusting other relevant settings, the Projects custom post type becomes inaccessible to visitors and search engines. It essentially renders the Projects invisible and non-functioning.

how to hide projects post type using the Divi Assistant plugin

Subscribe For More Things Like This!

At the start of each month, we send out a recap newsletter from the month before with family news, Divi news, our latest tutorials, and product news. Occasionally, if the news is too exciting to wait, we will send out another email separate from the monthly newsletter. That’s what you get when you subscribe, and of course you can unsubscribe if you are no longer interested!

Blog Post Optin
Divi Logo (2)

Shop Our Divi Products

Plugins • Courses • Templates

Visit The Shop

Featured Products

Asset 4

New! Trail Guides

Follow a series of blog posts carefully arranged around a specific topic or goal! Keep track of your progress by marking posts completed, just like a free course!

View Trial Guides

Divi Trail Committee Membership badge with map design

Join The Trail Committee!

Show support for our ongoing work creating community resources at Pee-Aye Creative and enjoy exclusive member perks in return.

Learn More

Divi Tutorials On YouTube

Our videos have views! Join subscribers and enjoy over video tutorials!

Visit Our Channel

Leave A Response!

By commenting you agree to our Blog & YouTube Comments Policy

1 Comment

Comments By Others

  1. Mar Vig

    I follow you, I read almost everything, even personal news, so cute.
    Your advices, tricks and tips are precious.. you are my final destination for Divi, very competent.
    I use Divi since ever, but I learn from you. Thanks, keep on doing such a good job.
    Cheers from France and Serbia, I am in between, always moving and doing Divi.

    M

    Reply

Submit a Comment

Your email address will not be published. Required fields are marked *

Recent Posts

0

Your Cart