• Resolved Richard Archambault

    (@richardmtl)


    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 use jetpack_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)
  • Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    We do not integrate automatically and out of box with Jetpack, so why it was showing up for you is a little strange. Not sure off the top of my head unless somewhere in Jetpack, it’s pulling like all the public post types or something?

    The only way we potentially interact with other plugins/themes, via the free plugin here, is if those products require adding a value to the “supports” argument for register_post_type, but even then we don’t actually know what’s being listed there.

    Typically we leave all specific compatibility code to our premium CPTUI-Extended plugin, where we actually list what we’re helping with, like Divi Builder and AMP. However, those are not on by default, just available.

    Thread Starter Richard Archambault

    (@richardmtl)

    Thanks! Well, it’ll remain a mystery, then, as to why Jetpack’s RP were showing up. Maybe I had some code deep in the bowels of my custom theme that was doing it, who knows. Thanks for the reply, marking as Resolved! 🙂

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.