Ejemplo n.º 1
0
							</div>
									
						</div>
					<?php 
}
?>
					
					<div class="column one column_blog">	
						<div class="blog_wrapper isotope_wrapper">
						
							<div class="posts_group lm_wrapper <?php 
echo implode(' ', $blog_classes);
?>
">
								<?php 
echo mfn_content_post(false, false, $load_more);
?>
							</div>
						
							<?php 
// pagination
if (function_exists('mfn_pagination')) {
    echo mfn_pagination(false, $load_more);
} else {
    ?>
										<div class="nav-next"><?php 
    next_posts_link(__('&larr; Older Entries', 'betheme'));
    ?>
</div>
										<div class="nav-previous"><?php 
    previous_posts_link(__('Newer Entries &rarr;', 'betheme'));
Ejemplo n.º 2
0
 function sc_blog($attr, $content = null)
 {
     extract(shortcode_atts(array('count' => 2, 'category' => '', 'category_multi' => '', 'style' => 'classic', 'greyscale' => '', 'more' => '', 'pagination' => '', 'load_more' => ''), $attr));
     $paged = get_query_var('paged') ? get_query_var('paged') : (get_query_var('page') ? get_query_var('page') : 1);
     $args = array('posts_per_page' => intval($count), 'paged' => $paged, 'post_status' => 'publish', 'ignore_sticky_posts' => 1);
     // categories
     if ($category_multi) {
         $args['category_name'] = trim($category_multi);
     } elseif ($category) {
         $args['category_name'] = $category;
     }
     // classes
     $classes = $style;
     if ($greyscale) {
         $classes .= ' greyscale';
     }
     if ($style == 'masonry') {
         $classes .= ' isotope';
     }
     if (!$more) {
         $classes .= ' hide-more';
     }
     $query_blog = new WP_Query($args);
     $output = '<div class="blog_wrapper isotope_wrapper clearfix">';
     $output .= '<div class="posts_group lm_wrapper ' . $classes . '">';
     $output .= mfn_content_post($query_blog, $style, $load_more);
     $output .= '</div>';
     if ($pagination) {
         $output .= mfn_pagination($query_blog, $load_more);
     }
     $output .= '</div>' . "\n";
     wp_reset_postdata();
     return $output;
 }
Ejemplo n.º 3
0
 function sc_blog($attr, $content = null)
 {
     extract(shortcode_atts(array('count' => 2, 'category' => '', 'category_multi' => '', 'style' => 'classic', 'columns' => 3, 'greyscale' => '', 'more' => '', 'filters' => '', 'pagination' => '', 'load_more' => ''), $attr));
     $translate['filter'] = mfn_opts_get('translate') ? mfn_opts_get('translate-filter', 'Filter by') : __('Filter by', 'betheme');
     $translate['tags'] = mfn_opts_get('translate') ? mfn_opts_get('translate-tags', 'Tags') : __('Tags', 'betheme');
     $translate['authors'] = mfn_opts_get('translate') ? mfn_opts_get('translate-authors', 'Authors') : __('Authors', 'betheme');
     $translate['all'] = mfn_opts_get('translate') ? mfn_opts_get('translate-item-all', 'All') : __('All', 'betheme');
     $translate['categories'] = mfn_opts_get('translate') ? mfn_opts_get('translate-categories', 'Categories') : __('Categories', 'betheme');
     $paged = get_query_var('paged') ? get_query_var('paged') : (get_query_var('page') ? get_query_var('page') : 1);
     $args = array('posts_per_page' => intval($count), 'paged' => $paged, 'post_status' => 'publish', 'ignore_sticky_posts' => 1);
     // categories
     if ($category_multi) {
         $args['category_name'] = trim($category_multi);
     } elseif ($category) {
         $args['category_name'] = $category;
     }
     // classes
     $classes = $style;
     if ($greyscale) {
         $classes .= ' greyscale';
     }
     if (!$more) {
         $classes .= ' hide-more';
     }
     if (in_array($style, array('masonry', 'masonry tiles'))) {
         $classes .= ' isotope';
     }
     $query_blog = new WP_Query($args);
     $output = '<div class="column_filters">';
     // Echo | Filters
     if ($filters && in_array($style, array('masonry', 'masonry tiles')) && !$category && !$category_multi) {
         $filters_class = '';
         if ($filters != 1) {
             $filters_class .= ' only ' . $filters;
         }
         $output .= '<div id="Filters" class="isotope-filters ' . $filters_class . '" data-parent="column_filters">';
         $output .= '<ul class="filters_buttons">';
         $output .= '<li class="label">' . $translate['filter'] . '</li>';
         $output .= '<li class="categories"><a class="open" href="#"><i class="icon-docs"></i>' . $translate['categories'] . '<i class="icon-down-dir"></i></a></li>';
         $output .= '<li class="tags"><a class="open" href="#"><i class="icon-tag"></i>' . $translate['tags'] . '<i class="icon-down-dir"></i></a></li>';
         $output .= '<li class="authors"><a class="open" href="#"><i class="icon-user"></i>' . $translate['authors'] . '<i class="icon-down-dir"></i></a></li>';
         $output .= '</ul>';
         $output .= '<div class="filters_wrapper">';
         // categories
         $output .= '<ul class="categories">';
         $output .= '<li class="reset current-cat"><a class="all" data-rel="*" href="#">' . $translate['all'] . '</a></li>';
         if ($categories = get_categories()) {
             foreach ($categories as $category) {
                 $output .= '<li class="' . $category->slug . '"><a data-rel=".category-' . $category->slug . '" href="' . get_term_link($category) . '">' . $category->name . '</a></li>';
             }
         }
         $output .= '<li class="close"><a href="#"><i class="icon-cancel"></i></a></li>';
         $output .= '</ul>';
         // tags
         $output .= '<ul class="tags">';
         $output .= '<li class="reset current-cat"><a class="all" data-rel="*" href="#">' . $translate['all'] . '</a></li>';
         if ($tags = get_tags()) {
             foreach ($tags as $tag) {
                 $output .= '<li class="' . $tag->slug . '"><a data-rel=".tag-' . $tag->slug . '" href="' . get_tag_link($tag) . '">' . $tag->name . '</a></li>';
             }
         }
         $output .= '<li class="close"><a href="#"><i class="icon-cancel"></i></a></li>';
         $output .= '</ul>';
         // authors
         $output .= '<ul class="authors">';
         $output .= '<li class="reset current-cat"><a class="all" data-rel="*" href="#">' . $translate['all'] . '</a></li>';
         $authors = mfn_get_authors();
         if (is_array($authors)) {
             foreach ($authors as $auth) {
                 $output .= '<li class="' . mfn_slug($auth->data->user_login) . '"><a data-rel=".author-' . mfn_slug($auth->data->user_login) . '" href="' . get_author_posts_url($auth->ID) . '">' . $auth->data->display_name . '</a></li>';
             }
         }
         $output .= '<li class="close"><a href="#"><i class="icon-cancel"></i></a></li>';
         $output .= '</ul>';
         $output .= '</div>';
         $output .= '</div>' . "\n";
     }
     // Echo | Main Content
     $output .= '<div class="blog_wrapper isotope_wrapper clearfix">';
     $output .= '<div class="posts_group lm_wrapper col-' . $columns . ' ' . $classes . '">';
     $output .= mfn_content_post($query_blog, $style, $load_more);
     $output .= '</div>';
     if ($pagination) {
         $output .= mfn_pagination($query_blog, $load_more);
     }
     $output .= '</div>' . "\n";
     $output .= '</div>' . "\n";
     wp_reset_postdata();
     return $output;
 }
Ejemplo n.º 4
0
					
					<div class="column one column_blog">	
						<div class="blog_wrapper isotope_wrapper">
						
							<?php 
if (category_description()) {
    echo '<div class="cat_description">' . category_description() . '</div>';
}
?>
						
							<div class="posts_group <?php 
echo implode(' ', $blog_classes);
?>
">
								<?php 
echo mfn_content_post();
?>
							</div>
						
							<?php 
// pagination
if (function_exists('mfn_pagination')) {
    echo mfn_pagination();
} else {
    ?>
										<div class="nav-next"><?php 
    next_posts_link(__('&larr; Older Entries', 'betheme'));
    ?>
</div>
										<div class="nav-previous"><?php 
    previous_posts_link(__('Newer Entries &rarr;', 'betheme'));