WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. xave
    Member
    Posted 2 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

    http://wordpress.org/extend/plugins/codepress-admin-columns/

  2. Codepress
    Member
    Plugin Author

    Posted 2 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)
    {
    	unset($post_types['events']);
    
    	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.

    Tobias.

  3. Codepress
    Member
    Plugin Author

    Posted 2 years ago #

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

    Tobias

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic