'publish', 'post_type' => array('anew','profile_article','yellow'), 'posts_per_page' => 5, 'orderby' => 'date', 'order' => 'DESC' ) ); $posts = json_decode(get_option('ppp_options')); $count = (int)get_option('randomnode_list_count'); $count = $count+1; update_option('randomnode_list_count', $count); //var_dump(); //die; $popular = get_posts( array( 'post__in' => array_map(function($obj){return $obj->id;},$posts), 'ignore_sticky_posts' => 1, 'post_type' => array('anew', 'yellow', 'profile_article'), 'posts_per_page' => 20 ) ); foreach ($popular as $key => $item){ if(get_post_meta($item->id,'popular_hide', true) == 1){ unset($popular[$key]); } } $posts = array_merge($last, array_slice($popular,0,5)); //var_dump($posts); //wp_redirect(, 301);//exit; ?>