Skip to content

Reset Custom Post Types

Sven edited this page Jun 20, 2020 · 4 revisions

As of version 1.2.1 of the Mark Posts Plugin we've implemented the filter mark_posts_excluded_post_types to exclude or include post types within the settings.

Usage

To exclude a post type add the slug of the post type to the $excluded_post_types of the mark_posts_excluded_post_types filter:

add_filter( 'mark_posts_excluded_post_types', function ($excluded_post_types) {
  return array_merge($excluded_post_types, ['post']);
});

The filter above will remove the option Post from the settings of the plugin.

Having questions? Feel free to raise an issue :)

Clone this wiki locally