Beispiel #1
0
								<?php 
        while (have_posts()) {
            the_post();
            ?>

									<?php 
            $wpex_count++;
            ?>

									<?php 
            get_template_part('partials/blog/blog-entry', 'layout');
            ?>

									<?php 
            if (wpex_blog_entry_columns() == $wpex_count) {
                $wpex_count = 0;
            }
            ?>

								<?php 
        }
        ?>

							</div><!-- #blog-entries -->

						<?php 
        // Display custom style for search entries
    } else {
        ?>
/**
 * Returns correct blog entry classes
 *
 * @since 1.1.6
 */
function wpex_blog_entry_classes()
{
    // Define classes array
    $classes = array();
    // Entry Style
    $entry_style = wpex_blog_entry_style();
    // Core classes
    $classes[] = 'blog-entry';
    $classes[] = 'clr';
    // Masonry classes
    if ('masonry' == wpex_blog_grid_style()) {
        $classes[] = 'isotope-entry';
    }
    // Equal heights
    if (wpex_blog_entry_equal_heights()) {
        $classes[] = 'blog-entry-equal-heights';
    }
    // Add columns for grid style entries
    if ($entry_style == 'grid-entry-style') {
        $classes[] = 'col';
        $classes[] = wpex_grid_class(wpex_blog_entry_columns());
    }
    // No Featured Image Class, don't add if oembed or self hosted meta are defined
    if (!has_post_thumbnail() && '' == get_post_meta(get_the_ID(), 'wpex_post_self_hosted_shortcode', true) && '' == get_post_meta(get_the_ID(), 'wpex_post_oembed', true)) {
        $classes[] = 'no-featured-image';
    }
    // Blog entry style
    $classes[] = $entry_style;
    // Avatar
    if ($avatar_enabled = wpex_get_mod('blog_entry_author_avatar')) {
        $classes[] = 'entry-has-avatar';
    }
    // Counter
    global $wpex_count;
    if ($wpex_count) {
        $classes[] = 'col-' . $wpex_count;
    }
    // Apply filters to entry post class for child theming
    $classes = apply_filters('wpex_blog_entry_classes', $classes);
    // Rturn classes array
    return $classes;
}
Beispiel #3
0
            if ('grid-entry-style' == wpex_blog_fit_rows()) {
                echo '</div><!-- .row -->';
            }
            $wpex_count = 0;
        }
        // End loop
    }
    // Make sure row is closed for the fit rows style blog
    if ('grid-entry-style' == wpex_blog_fit_rows()) {
        if ('4' == wpex_blog_entry_columns() && $wpex_total_posts % 4 != 0) {
            echo '</div><!-- .row -->';
        }
        if ('3' == wpex_blog_entry_columns() && $wpex_total_posts % 3 != 0) {
            echo '</div><!-- .row -->';
        }
        if ('2' == wpex_blog_entry_columns() && $wpex_total_posts % 2 != 0) {
            echo '</div><!-- .row -->';
        }
    }
    ?>
					</div><!-- #blog-entries -->
					<?php 
    // Display post pagination
    wpex_blog_pagination();
    ?>
				</div><!-- #content -->
			</section><!-- #primary -->
			<?php 
    // Get site footer
    get_sidebar();
    ?>
Beispiel #4
0
    echo term_description();
    ?>
					</div><!-- #category-description -->
				<?php 
}
?>
				<?php 
// Display posts if there are in fact posts to display
if (have_posts()) {
    /*-----------------------------------------------------------------------------------*/
    /*	- Standard Post Type Posts (BLOG)
    			/*	- See framework/conditionals.php
    			/*-----------------------------------------------------------------------------------*/
    if (wpex_is_blog_query()) {
        // Some useful vars
        $wpex_entry_columns = wpex_blog_entry_columns();
        ?>
						<div id="blog-entries" class="clr <?php 
        wpex_blog_wrap_classes();
        ?>
">
							<?php 
        // Start counters to create rows
        $wpex_total_posts = $wpex_count = 0;
        // Loop through posts
        while (have_posts()) {
            the_post();
            // Add row for the fit rows style blog
            if (0 == $wpex_count && wpex_blog_fit_rows()) {
                ?>
									<div class="blog-row clr">