Display custom posts with category with the "recent posts" element

Hello,

I have registered a custom post type on my site and I want to display them with the recent post types element in Cornerstone.

I did everything according to this helpful post:

So I have this code in my childtheme now (maehroboter being my custom post type):

function add_event_post_type( $types ) {
	$types['maehroboter'] = 'maehroboter';

	return $types;
}

add_filter( 'cs_recent_posts_post_types', 'add_event_post_type', 999 );

In Cornerstone I can now select my own custom post type:

However, as you can see from the screenshot, I am also trying to filter by category. My custom post types have categories, one of which has the ID 92. Unfortunately, nothing is displayed on my page. It only works when I leave this field empty. How do I make this work?

Hi Mathias,

The Custom Post Type category is whole another ball game as you should use the taxonomies to be able to retrieve the information.

It is not a feature that the Recent Posts feature can handle. You will need to do customization for this which is way outside of our support scope.

The way that I suggest you can do is to add a shortcode and retrieve your custom post type category there.

If you can not code such a thing, you will need to hire a developer to do it for you.

Thank you.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.