How to show child pages of the current page?

With Content Views free version, you can insert the ID of a parent page to show all its child pages. But when you have a lot of parent pages, it will take time & effort to create each View for each parent page.

To save your time and effort, Content Views Pro has a useful feature to show the child pages of the current page automatically, without having to specify the page ID. You only need to create one view for all of your parent pages.

In the “Filter Settings” tab, please:
1) select the checkbox Use current page as base/parent page then
2) select the option Show its children:

By using that View on any parent pages, Content Views Pro will show child pages of the current parent page automatically.

# Extend to custom post type

By default, this feature is only available to Page. If you register a custom post type which is hierarchical too, and want to show children posts, please add this code to file functions.php in the theme’s folder:

// Content Views Pro - Enable showing childs of custom post type
add_filter( 'pt_cv_hierarchical_post_type', 'cvp_theme_hierarchical_post_type', 100, 1 );
function cvp_theme_hierarchical_post_type( $args ) {
	$args[] = 'product'; // <= use the custom post type here
	return $args;
}

Best regards,