• Resolved M C

    (@mcyger)


    Your plugin is fantastic!

    Can you consider adding support for bbPress, please?

    bbPress (by WordPress) uses a custom post type but the native posts database table. Unfortunately, I do not see the “Purge” option when editing a bbPress post as I do with a regular WordPress post.

    If there’s a function I can add to my functions.php to get this to work in the meantime, that would be awesome.

    Thanks in advance for your support! And thanks again for a great plugin.

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

    (@mcyger)

    Of course as soon as I post, I find some code:

    function bweb_wpsrd_add_post_types( $postTypes ) {
        $postTypes[] = 'topic';
        return $postTypes;
    	}
    add_filter( 'wpsrd_post_types_list', 'bweb_wpsrd_add_post_types' );

    But now my question is how do I include MULTIPLE postTypes in this function?

    So, for example, I want to be able to purge bbPress “topic”, bbPress “reply” and WooCommerce “product”?

    Thank you!

    Plugin Author Brice Capobianco

    (@brikou)

    Hi,
    The documentation where you copied the above function already explains how to include multiple CPTs.

    function bweb_wpsrd_add_post_types( $postTypes ){
        $postTypes[] = 'additional-cpt';
        $postTypes[] = 'another-cpt';
        return $postTypes;
    }
    add_filter( 'wpsrd_post_types_list', 'bweb_wpsrd_add_post_types' );

    It also explain that you can use the WordPress core function get_post_types() to activate it for all you CPTs. So something like this should work for you.

    function bweb_wpsrd_add_post_types( $postTypes ){
        return get_post_types();
    }
    add_filter( 'wpsrd_post_types_list', 'bweb_wpsrd_add_post_types' );

    Best,

    Brice

    Thread Starter M C

    (@mcyger)

    Thank you, Brice!

    Plugin Author Brice Capobianco

    (@brikou)

    You’re very welcome.
    Please leave a review if you enjoy the plugin, that will help to support it ??
    Best,

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Support for bbPress’ is closed to new replies.