Does CPT UI implement Jetpack’s Related Posts out of the box?
-
Hi! I was wondering if CPT UI implements Jetpack’s Related Posts out of the box:
https://jetpack.com/support/related-posts/customize-related-posts/#related-posts-custom-post-types
To do so, you’d have to use the
rest_api_allowed_post_types
filter. I ask, because JP’s RP were showing up on my CPT even though I didn’t implement the filter anywhere, and I wasn’t able to remove them with that filter, either; I had to usejetpack_relatedposts_filter_options
instead. For anyone who comes across this post, I used the following code:function ra_jetpack_singular_no_related_posts( $options ) { if ( is_singular( 'MY-CPT-SLUG' ) ) { $options['enabled'] = false; } return $options; } add_filter( 'jetpack_relatedposts_filter_options', 'ra_jetpack_singular_no_related_posts' );
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Does CPT UI implement Jetpack’s Related Posts out of the box?’ is closed to new replies.