skip to Main Content

I have installed Linoor theme which contains a post type called ‘Events’. I want to implement the Events submission form for admin as well as visitors. The plugin Events Manager provides this facility for visitors to submit their events with admin approval. However, the plugin doesn’t override the post type created by the theme. Also, in the admin side the ‘Events’ post type as duplicated fields for Event Address, location, timings, etc.

Is there a way to disable or remvoe this post type? Or hide/remove/disable the fields while creating a new event?

I looked up the theme and plugin’s documentation but couldn’t find the prooper way to solve this.

2

Answers


  1. you can use simply this code in functions.php

    function remove_post_type(){
      unregister_post_type( 'events' );
    }
    add_action('init','remove_post_type', 100);
    
    Login or Signup to reply.
  2. You can use unregister_post_type with CPT’s slug.

    Reference:
    https://wordpress.stackexchange.com/questions/3820/deregister-custom-post-types

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search