Admin Columns
[resolved] Ignore specific post-types (3 posts)

  1. xave
    Posted 4 years ago #

    Is there a way to ignore specific post types via a filter?
    I'm using 'amr-ical-events' and Admin Columns cannot see some of it's custom fields, and breaks the display a little.

    Many thanks


  2. Codepress
    Plugin Author

    Posted 4 years ago #

    That filter hasn't been build in the current version ( 1.3.1 and older ).

    I will add this to the next release (1.4 and up), which will be released shortly.

    Then you would be able to remove any post type you'd like from the admin columns by adding the following code to your functions.php in your theme folder.

    add_filter('cpac-get-post-types', 'remove_post_types_from_admin_columns');
    function remove_post_types_from_admin_columns($post_types)
    	return $post_types;

    In this example I have used 'events' as the custom post type that is removed from the codepress admin columns. It won't affect anything else that has to do with this post type, just the columns.

    Hope this will help you filter out unwanted post types.


  3. Codepress
    Plugin Author

    Posted 4 years ago #

    The 1.4 release is out! Now you can use the example code above. Let me know if it does the trick.


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Admin Columns
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic