Esempio n. 1
0
 function shortcode_blog_full($atts, $content = null)
 {
     extract(shortcode_atts(array('type' => 'blog_cat', 'counts' => '5', 'cats' => '', 'posts' => '', 'order' => 'DESC', 'orderby' => 'date'), $atts));
     if (!in_array($type, array('blog_cat', 'blog_tag'), true)) {
         return $html = '<div class="the-not-posts">' . esc_attr__('Hi, please check the type option, the current type is not match!', 'Twoot_Toolkit') . '</div>';
     }
     switch ($type) {
         case 'blog_cat':
             $taxonomy = 'category';
             break;
         case 'blog_tag':
             $taxonomy = 'post_tag';
             break;
     }
     $q = new Twoot_Template_Blog(array('counts' => $counts, 'cats' => $cats, 'posts' => $posts, 'order' => $order, 'orderby' => $orderby, 'post_type' => 'post', 'taxonomy' => $taxonomy));
     $html = $q->full_blog();
     return $html;
 }
Esempio n. 2
0
    ?>
		<?php 
    if (get_the_content()) {
        ?>
		<div class="post-content">
			<?php 
        the_content();
        ?>
		</div>
		<?php 
    }
    ?>
	<?php 
}
?>

	<?php 
$q = new Twoot_Template_Blog(array('counts' => twoot_get_frontend_func('opt', 'opt', 'blog_counts'), 'cats' => '', 'posts' => '', 'order' => 'DESC', 'orderby' => 'date', 'post_type' => 'post', 'taxonomy' => 'category'));
echo $q->full_blog();
?>

	</div>
</article>
<!--end #primary-->

</div>
</div>
<!--end #content-->

<?php 
get_footer();
Esempio n. 3
0
    if (get_the_content()) {
        ?>
		<div class="post-content">
			<?php 
        the_content();
        ?>
		</div>
		<?php 
    }
    ?>
	<?php 
}
?>

	<?php 
$q = new Twoot_Template_Blog(array('counts' => twoot_get_frontend_func('opt', 'opt', 'blog_counts'), 'cats' => '', 'posts' => '', 'order' => 'DESC', 'orderby' => 'date', 'post_type' => 'post', 'taxonomy' => 'category'));
echo $q->blog();
?>

	</div>
</article>
<!--end #primary-->

<?php 
if ($layout == 'right') {
    echo twoot_generator('sidebar', $widget, $layout);
}
?>

</div>
</div>