define('WP_USE_THEMES', false); require_once('../../../wp-load.php'); $featured = get_option( 'featured_IDs'); $single = $_GET["single"]; $ids = explode( ',', $featured ); if($single) { $loop = new WP_Query(array('post_type' => array ( 'post'), 'posts_per_page' => -1, 'order' => 'date')); }else{ $loop = new WP_Query(array('post_type' => array ( 'post'), 'posts_per_page' => -1, 'post__not_in'=> $ids, 'order' => 'date')); } while ( $loop->have_posts() ) : $loop->the_post(); $thumb = wp_get_attachment_image_src( get_post_thumbnail_id(), 'large'); $thumb_url = $thumb[0]; $id = $post->ID; $category = get_the_category($id); $categoryname = $category[0]->cat_name; $rb_youtube_video = get_post_meta($id, "rb_youtube_video", true); $rb_vimeo_video = get_post_meta($id, "rb_vimeo_video", true); if($rb_youtube_video || $rb_vimeo_video) { $link_text = "Ver Video"; }else{ $link_text = "Leer más"; } ?>