-1, 'post_type' => 'broadcast', 'orderby' => 'title', 'order' => 'asc', /* 'exclude' => array( 'key'=> '_wp_page_template', 'value' => 'old_broadcast_template.php', 'compare' => '!=' )*/ ); $broadcast = get_posts($broadcast_post); //'
';
    //var_dump($broadcast);
    //echo '
'; $attive = array(); $concluse = array(); foreach ($broadcast as $post) { $on_air_day = get_post_meta($post->ID, 'on_air_day_0', false); $on_air = empty($on_air_day[0]) ? false : true; if ($on_air) { array_push($attive,$post); } else { array_push($concluse,$post); } } $content = '
[ Attive ] [ Concluse ]
'; echo $content; $content = '

[[[ Attive ]]]

'; $content .= "
\n"; foreach ($attive as $post) { $content .= '
'; //$content .= '" style="background:url(\''.$post['thumb_url'].'\') no-repeat center center;background-size:cover;">'; //$content .= '

'.$post['thumb_url'].'

'; $content .= '
'; $content .= ''; $content .= '

'.$post->post_title.'

'; $content .= '
'; //$content .= '

'.$post['the_permalink'].'

'; $content .= "
\n"; } $content .= "
\n"; echo $content; $content = '


[[[ CONCLUSE ]]]

'; $content .= "
\n"; foreach ($concluse as $post) { $content .= '
'; //$content .= '" style="background:url(\''.$post['thumb_url'].'\') no-repeat center center;background-size:cover;">'; //$content .= '

'.$post['thumb_url'].'

'; $content .= '
'; $content .= ''; $content .= '

'.$post->post_title.'

'; $content .= '
'; //$content .= '

'.$post['the_permalink'].'

'; $content .= "
\n"; } $content .= "
\n"; echo $content; //wp_enqueue_style('palinsesto_style', plugin_dir_url(__FILE__).'css/palinsesto.css', array(), '1.0', 'screen'); wp_enqueue_style('trasmissioni_style', plugin_dir_url(__FILE__).'css/trasmissioni.css', array(), '1.0', 'screen'); } add_shortcode('broadcast_list', 'rwt_broadcast_list');