Complicated queries

Class Reference/WP Meta Query

<?php
	$args = array(
		'posts_per_page' => -1,
		'post_type' => 'city',
		'paged'=>false,
		'orderby'=> 'menu_order',
		'order' => 'ASC',
		'tax_query' => array(
				array(
					'taxonomy' => 'video-template-types',
					'field' => 'id',
					'terms' => $type['id']
				)
			),

		'meta_query' => array(
			array  (
				'key'  => 'main',
				'value'=> 1
				)
			)
		);

	//query_posts($args);
	$cards = get_posts( $args );

	foreach ( $cards as $post ) {
		$post_orig = $post;
		setup_postdata( $post );
		?>
		...
	<?php }
	wp_reset_postdata();
	wp_reset_query();
?>

Get post by title:

    $post = get_page_by_path($post_title, "OBJECT" ,'custom_post_type');

Post in:

$args = array(
    'post_type' => 'testimonials',
    'posts_per_page' => 4,
    'orderby' => 'ID', 
    'post__in' => array(883, 563, 568, 106);
);

https://developer.wordpress.org/reference/functions/get_post/

get_post($post_id)