Closed aliasbody closed 6 years ago
A simpler solution is to add a custom taxonomy (hidden or not) to differentiate content-a from content-b, and then apply a custom single layout based on what term that post type is. This way it keeps in the same post type but adds the flexibility you need.
Hi guys, i try used this code
// Showing multiple post types in Posts Widget
add_action( 'elementor/query/news-id', function( $query ) {
// Here we set the query to fetch posts with
// post type of 'custom-post-type1' and 'custom-post-type2'
$query->set( 'post_type', [ 'articoli', 'eventi' ] );
} );
but not work
look this image, i need to add this posttype , events and article, Eventi e Articoli https://imgur.com/ehxo1G4
Prerequisites
What problem is your feature request going to solve? Please describe. The actual portfolio does almost everything we need expect the multi-choice of sources in the content-type. On our website we create two new content-types, let's call them Content A and Content B, and this helps us divide better the kind of content (since we also use "Single" templates for each one with a different design).
And now we are trying to add a portfolio to the home page with the two of them listed, but this isn't possible right now since only one source (of content-type) can be selected.
Describe the solution you'd like A clear, and simple solution, would be to handle this like tags, in a way that we could select one or multiple content-types and just have them filtered as such.
Describe alternatives you've considered The only alternative we've considered is to develop our own widget but it would be a pure copy of this one just to add a functionality.
Additional context N/A