Skip to content

Add Thread comments meta box to custom post types

Out of the box XFtoWP adds the create new thread meta box to posts and pages only. With this simple filter you can add the same meta box controls to custom post types.

Simply pass the post type ID to the xfwp_comments_post_types filter in your child theme’s functions.php or plugin file:

/**
 * Add XFtoWP meta boxes to custom post types.
 *
 * @since 1.0
 */
function xftowp_custom_post_types( $post_types ) {
	$post_types[] = 'post_type_id';
	$post_types[] = 'stream';
	return $post_types;
}
add_filter( 'xfwp_comments_post_types', 'xftowp_custom_post_types' );

Alex Mangini

Hi, I’m Alex! I started writing about web design and blogging at 13 years old, which turned into client work, which led to building my own software. 15 years later I’m still at it, and XFtoWP is the plugin I always wanted to connect my two favorite software together.

Get sneak peaks, release note, success stories, and other interesting WordPress and XenForo content sent to your inbox.

Unsubscribe anytime.