Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

cas

// WP_Query arguments
$args = array(
	'p'                      => 'post_id',
	'name'                   => 'post_name',
	'page_id'                => 'page_id',
	'pagename'               => 'page_name',
	'post_parent'            => 'parent_id',
	'post_type'              => array( 'post_type' ),
	'post_status'            => array( 'post_status' ),
	'has_password'           => true,
	'post_password'          => 'post_password',
	'author'                 => 'author_id',
	'author_name'            => 'author_name',
	's'                      => 'search_qry',
	'nopaging'               => false,
	'paged'                  => 'paged_(pageX_s_posts)',
	'posts_per_page'         => 'post_per_page',
	'posts_per_archive_page' => 'pper_achive',
	'ignore_sticky_posts'    => false,
	'offset'                 => 'offset_(displace)',
	'order'                  => 'ASC',
	'orderby'                => 'modified',
	'tax_query'              => array(
		array(
			'taxonomy'         => 'likes',
			'terms'            => 'like_count',
			'field'            => 'term_id',
			'operator'         => 'AND',
			'include_children' => true,
		),
		array(
			'taxonomy'         => 'views',
			'terms'            => 'view_count',
			'field'            => 'term_id',
			'operator'         => 'AND',
			'include_children' => true,
		),
	),
	'perm'                   => 'permizzionas',
);

// The Query
$query = new WP_Query( $args );