WP QUERY Multiple post type
-
I am using your plugin and also elementor and code snipper plugin. I have created two custom post types with new database table. I was using elementor post widget and query id with function in code snippet:
function my_query_by_post_types( $query ) {
$query->set( ‘post_type’, [ ‘furniture’, ‘mobile’ ] );
}
add_action( ‘elementor/query/multiple_cpts’, ‘my_query_by_post_types’ );but now when I have custom post types in new database table, this query is not working. It was working only if custom post types was in the same WP POST table and now I have new tables wp_cpt_furniture and wp_cpt_mobile.
How to modify this script in code snippet? thanks
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘WP QUERY Multiple post type’ is closed to new replies.