Example #1
0
 protected function content($atts, $content = null)
 {
     $title = $width = $el_class = $output = $show_blog_aux = $exclude_categories = $blog_aux = $show_read_more = $offset = $posts_order = $content_output = $items = $item_figure = $el_position = '';
     extract(shortcode_atts(array('title' => '', 'show_blog_aux' => 'yes', "blog_type" => "standard", "masonry_effect_type" => "effect-1", 'show_title' => 'yes', 'show_excerpt' => 'yes', "show_details" => 'yes', "offset" => '0', "posts_order" => 'DESC', "excerpt_length" => '20', 'show_read_more' => 'yes', "item_count" => '5', "category" => '', "exclude_categories" => '', "pagination" => "no", "content_output" => 'excerpt', 'el_position' => '', 'width' => '1/1', 'el_class' => ''), $atts));
     $width = spb_translateColumnWidthToSpan($width);
     /* SIDEBAR CONFIG
        ================================================== */
     $sidebar_config = get_post_meta(get_the_ID(), 'sf_sidebar_config', true);
     $sidebars = '';
     if ($sidebar_config == "left-sidebar" || $sidebar_config == "right-sidebar") {
         $sidebars = 'one-sidebar';
     } else {
         if ($sidebar_config == "both-sidebars") {
             $sidebars = 'both-sidebars';
         } else {
             $sidebars = 'no-sidebars';
         }
     }
     /* BLOG AUX
        ================================================== */
     if ($show_blog_aux == "yes" && $sidebars == "no-sidebars") {
         $blog_aux = sf_blog_aux($width);
     }
     /* BLOG ITEMS
        ================================================== */
     $items = sf_blog_items($blog_type, $masonry_effect_type, $show_title, $show_excerpt, $show_details, $excerpt_length, $content_output, $show_read_more, $item_count, $category, $exclude_categories, $pagination, $sidebars, $width, $offset, $posts_order);
     /* FINAL OUTPUT
     			================================================== */
     $el_class = $this->getExtraClass($el_class);
     $output .= "\n\t" . '<div class="spb_blog_widget spb_content_element ' . $width . $el_class . '">';
     $output .= "\n\t\t" . '<div class="spb_wrapper blog-wrap">';
     $output .= $title != '' ? "\n\t\t\t" . '<h3 class="spb-heading"><span>' . $title . '</span></h3>' : '';
     if ($blog_aux != "") {
         $output .= "\n\t\t\t" . $blog_aux;
     }
     $output .= "\n\t\t\t" . $items;
     $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.spb_wrapper');
     $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
     if ($blog_type == "masonry-fw") {
         $output = $this->startRow($el_position, '', true) . $output . $this->endRow($el_position, '', true);
     } else {
         $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
     }
     global $sf_has_blog, $sf_include_imagesLoaded;
     $sf_include_imagesLoaded = true;
     $sf_has_blog = true;
     return $output;
 }
Example #2
0
				</div>
					
				<aside class="sidebar left-sidebar col-sm-4">
					<?php 
    dynamic_sidebar($left_sidebar);
    ?>
				</aside>
			</div>
			<?php 
} else {
    ?>
			
			<div class="page-content clearfix">

				<?php 
    echo sf_blog_aux($width);
    ?>

				<?php 
    if (have_posts()) {
        ?>
					
					<div class="blog-wrap blog-items-wrap blog-<?php 
        echo $blog_type;
        ?>
 <?php 
        echo $wrap_class;
        ?>
">
					
						<?php