0) { // Switch for Query type switch ($tempera_slideType) { case 'Latest Posts' : $custom_query->query('showposts='.$tempera_slideNumber.'&ignore_sticky_posts=' . apply_filters('tempera_pp_nosticky', 1) ); break; case 'Random Posts' : $custom_query->query('showposts='.$tempera_slideNumber.'&orderby=rand&ignore_sticky_posts=' . apply_filters('tempera_pp_nosticky', 1) ); break; case 'Latest Posts from Category' : $custom_query->query('showposts='.$tempera_slideNumber.'&category_name='.$tempera_slideCateg.'&ignore_sticky_posts=' . apply_filters('tempera_pp_nosticky', 1) ); break; case 'Random Posts from Category' : $custom_query->query('showposts='.$tempera_slideNumber.'&category_name='.$tempera_slideCateg.'&orderby=rand&ignore_sticky_posts=' . apply_filters('tempera_pp_nosticky', 1) ); break; case 'Sticky Posts' : $custom_query->query(array('post__in' => get_option( 'sticky_posts' ), 'showposts' =>$tempera_slideNumber,'ignore_sticky_posts' => 1)); break; case 'Specific Posts' : // Transofm string separated by commas into array $pieces_array = explode(",", $tempera_slideSpecific); $custom_query->query(array( 'post_type' => 'any', 'showposts' => -1, 'post__in' => $pieces_array, 'ignore_sticky_posts' => apply_filters('tempera_pp_nosticky', 1),'orderby' => 'post__in' )); break; case 'Custom Slides': break; case 'Disabled': break; }//switch }; // switch for reading/creating the slides switch ($tempera_slideType) { case 'Disabled': break; case 'Custom Slides': for ($i=1;$i<=5;$i++): if(${"tempera_sliderimg$i"}): $slide['image'] = esc_url(${"tempera_sliderimg$i"}); $slide['link'] = esc_url(${"tempera_sliderlink$i"}); $slide['title'] = ${"tempera_slidertitle$i"}; $slide['text'] = ${"tempera_slidertext$i"}; $slides[] = $slide; endif; endfor; break; default: if($tempera_slideNumber>0): if ( $custom_query->have_posts() ) while ($custom_query->have_posts()) : $custom_query->the_post(); $img = wp_get_attachment_image_src( get_post_thumbnail_id( get_the_ID() ), 'slider'); if (false === $img) continue; // skip posts that don't have featured images set $slide['image'] = esc_url( $img[0] ); $slide['link'] = esc_url( get_permalink() ); $slide['title'] = get_the_title(); $slide['text'] = get_the_excerpt(); $slides[] = $slide; endwhile; endif; // slidenumber>0 break; }; // switch if (count($slides)>0) { ?>
slider-navhover slider-">
$slide) { if($slide['image']): ?> '> ' data-thumb='' alt="" title="#caption" />
$slide) { ?>
0?'

'.$slide['title'].'

':''); echo (strlen($slide['text'])>0?'
'.$slide['text'].'
':''); ?>
0): // Switch for Query type switch ($tempera_columnType) { case 'Latest Posts' : $custom_query2->query('showposts='.$tempera_columnNumber.'&ignore_sticky_posts=1'); break; case 'Random Posts' : $custom_query2->query('showposts='.$tempera_columnNumber.'&orderby=rand&ignore_sticky_posts=1'); break; case 'Latest Posts from Category' : $custom_query2->query('showposts='.$tempera_columnNumber.'&category_name='.$tempera_columnCateg.'&ignore_sticky_posts=1'); break; case 'Random Posts from Category' : $custom_query2->query('showposts='.$tempera_columnNumber.'&category_name='.$tempera_columnCateg.'&orderby=rand&ignore_sticky_posts=1'); break; case 'Sticky Posts' : $custom_query2->query(array('post__in' => get_option( 'sticky_posts' ), 'showposts' =>$tempera_columnNumber, 'ignore_sticky_posts' => 1)); break; case 'Specific Posts' : // Transform string separated by commas into array $pieces_array = explode(",", $tempera_columnSpecific); $custom_query2->query(array( 'post_type' => 'any', 'post__in' => $pieces_array, 'ignore_sticky_posts' => 1,'orderby' => 'post__in', 'showposts' => -1 )); break; case 'Widget Columns': case 'Disabled': // no query needed break; }; //switch endif; // columnNumber>0 // switch for reading/creating the columns switch ($tempera_columnType) { case 'Disabled': break; case 'Widget Columns': // if widgets loaded if (is_active_sidebar('presentation-page-columns-area')) { echo "
"; dynamic_sidebar( 'presentation-page-columns-area' ); echo "
"; } // if no widgets loaded use the defaults else { global $tempera_column_defaults; tempera_columns($tempera_column_defaults,$tempera_nrcolumns, $tempera_columnreadmore); } break; default: if($tempera_columnNumber>0): if ( $custom_query2->have_posts() ) while ($custom_query2->have_posts()) : $custom_query2->the_post(); $img = wp_get_attachment_image_src( get_post_thumbnail_id( get_the_ID() ),'columns'); $column['image'] = esc_url( $img[0] ); $column['link'] = esc_url( get_permalink() ); $column['text'] = get_the_excerpt(); $column['title'] = get_the_title(); $columns[] = $column; endwhile; tempera_columns($columns,$tempera_nrcolumns, $tempera_columnreadmore); endif; // columnNumber>0 break; }; // switch } // tempera_ppcolumns() function tempera_columns($columns,$nr_columns,$readmore){ $counter=0; global $temperas; extract($temperas); ?>
(($counter%$nr_columns)?$counter%$nr_columns:$nr_columns), 'counter' => $counter, 'image' => esc_url( $column['image'] ), 'link' => esc_url( $column['link'] ), 'blank' => ($column['blank']?'target="_blank"':''), 'title' => wp_kses_data($column['title']), 'text' => wp_kses_data($column['text']), 'readmore' => wp_kses_data($readmore), ); tempera_singlecolumn_output($coldata); endif; }; ?>