query_posts has a construction with query_posts
query_posts( array( 'post_type' => APP_POST_TYPE, 'meta_query' => array( array('key' => 'cp_category', 'value' => 'ะะต ะพะฟัะตะดะตะปะตะฝะพ', 'compare' => '=')), 'ignore_sticky_posts' => 1 ) ); get_template_part( 'loop', 'ad_listing' ); wp_reset_query(); On the first page, everything is displayed well, but pagination no longer works. I try to rewrite with replacement on get_posts like this, but some half-empty nonsense is displayed in the meta-data.
$categories = get_posts( array( 'post_type' => APP_POST_TYPE, 'meta_query' => array( array('key' => 'cp_category', 'value' => 'ะะต ะพะฟัะตะดะตะปะตะฝะพ', 'compare' => '=')), 'ignore_sticky_posts' => 1 ) ); foreach( $categories as $$category ) { get_template_part( 'loop', 'ad_listing' ); } wp_reset_postdata(); ?> How to fix it and solve the problem with pagination?