Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter kato

    (@kato)

    FWIW – future strugglers, it’s butt-simple to edit line 93 of the plug-in to something like this:

    $post_types = apply_filters( ‘epr_post_types’, array( ‘post’, ‘page’, ‘report’ ) );

    It works, just replace ‘report’ above with your CPT name.

    It would be nice to do this the proper way, but for now, it’s working.

    Thread Starter kato

    (@kato)

    Or, to make it work with all post types, change line 93 to:

    $post_types = array_values( get_post_types( array( ‘public’ => true, ‘_builtin’ => false ), ‘names’ ) );

    Although I’m not sure that wouldn’t bloat the bejeezus out of your database.

    This seems to work for me

    add_filter( 'epr_post_types', 'my_function' );
    function my_function( $content_types ){
    	$content_types = array('my_content_type');
    	return $content_types;
    }
    Thread Starter kato

    (@kato)

    That works, thank you!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘I could use sample code for enabling EPR with CPTs’ is closed to new replies.