Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #546311

    In my project I have no need of the Post type Portfolio. So I try to remove it and all its related functions in my child theme like so:

    // remove portfolio CPT
    remove_action('init', 'portfolio_register');
    remove_filter("manage_edit-portfolio_columns", "prod_edit_columns");
    remove_filter("manage_edit-post_columns", "post_edit_columns");
    remove_action("manage_posts_custom_column",  "prod_custom_columns");
    

    These are the first four lines of the functions.php in my child theme. Unfortunately this does not work. A quick check like this

    var_dump(remove_action('init', 'portfolio_register'));

    always returns false. I know that I could easily comment out the line 396 in enfolds functions.php, but I would rather achieve that from my child theme. Any advices?

    #546351
    add_action( 'after_setup_theme','remove_portfolio', 100 );
    	
    	function remove_portfolio() {
    		remove_action( 'init', 'portfolio_register');
    	}

    Try this

    #546354

    Works like a charm. THanks a bunch!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Remove CPT Portfolio completely?’ is closed to new replies.