Recent Post modul in Cornerstone

How can get the modul to recognize my custom post type so that I can select it in the editor?
Here

Hello There,

Thanks for writing in! What you are trying to accomplish requires a template customization, we would highly to suggest that you use a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.

After the child theme is set up, please add the following code in your child theme’s functions.php file

// Add custom post type to recent posts element
// =============================================================================
function add_custom_post_type( $types ) {
  $types['product'] = 'product';
  return $types;
}
add_filter( 'cs_recent_posts_post_types', 'add_custom_post_type' );
// =============================================================================

Please do not forget to change product with your custom post type slug. I just used the product as an example and demonstrate to add the Products in the recent posts element.

We would loved to know if this has work for you. Thank you.

Would like to use the recent posts element (seems to be called Classic Recent Post element now) to display recent event post type for M.E. Calendar Events. How can I do this?

Thanks

Hi There,

Please add the following code under functions.php file locates in your child theme:

function add_custom_post_type( $types ) {
	$types['mec-events'] = 'mec-events';
	return $types;
}
add_filter( 'cs_recent_posts_post_types', 'add_custom_post_type', 999 );

Let us know how it goes!