예제 #1
0
function blox_loop_grid_hook($options)
{
    $options = array_merge(array('overlay' => 'none', 'excerpt' => 'nocontent', 'readmore' => '', 'grid' => '4', 'element_style' => 'default'), $options);
    global $post, $layout_sidebar;
    $crop_width = 173;
    if ($layout_sidebar == 'full') {
        $crop_width = 247;
    }
    $class = 'col-md-3 col-sm-6 col-xs-12';
    if ($options['grid'] == '2') {
        $class = 'col-md-6 col-sm-6 col-xs-12';
    } else {
        if ($options['grid'] == '3') {
            $class = 'col-md-4 col-sm-6 col-xs-12';
        }
    }
    $post_format = get_post_format();
    $post_format = $post_format != '' ? $post_format : 'standard';
    ?>
    <div class="<?php 
    echo $class;
    ?>
 loop-item">
        <article itemscope itemtype='http://schema.org/BlogPosting' <?php 
    post_class('entry ' . $options['element_style'] . ' format-' . $post_format);
    ?>
>
            <?php 
    echo hover_featured_image(array('overlay' => $options['overlay']));
    ?>
            <div class="relative">
                <div class="entry-title">
                    <h2 itemprop="headline">
                        <a itemprop="url" href="<?php 
    echo permalink();
    ?>
"><?php 
    the_title();
    ?>
</a>
                    </h2>
                </div>
                <?php 
    blox_post_content(array('excerpt' => $options['excerpt'], 'button' => 'small', 'readmore' => $options['readmore']));
    ?>
                <ul class="entry-meta list-inline">
                    <li itemprop="datePublished" class="meta-date"><?php 
    echo date_i18n(get_option('date_format'), strtotime(get_the_date()));
    ?>
</li>
                    <li itemprop="author" class="meta-author"><?php 
    echo __("By ", "themeton") . get_author_posts_link();
    ?>
</li>
                    <li itemprop="keywords" class="meta-category"><?php 
    echo __('In', 'themeton') . ' ' . get_the_category_list(', ');
    ?>
</li>
                    <li itemprop="comment" class="meta-comment pull-right"><?php 
    echo comment_count();
    ?>
</li>
                    <li class="meta-like pull-right"><?php 
    echo get_post_like(get_the_ID());
    ?>
</li>
                </ul>
            </div>
        </article>
    </div>
    <?php 
}
예제 #2
0
            echo call_user_func('blox_format_' . $post_format);
        }
    }
    //post format
    ?>
									<div class="entry-title"><h1><?php 
    the_title();
    ?>
</h1></div>
									<ul class="entry-meta list-inline">
									    <li itemprop="datePublished" class="meta-date"><?php 
    echo date_i18n(get_option('date_format'), strtotime(get_the_date()));
    ?>
</li>
									    <li itemprop="author" class="meta-author"><?php 
    echo __("By ", "themeton") . get_author_posts_link();
    ?>
</li>
									    <li itemprop="keywords" class="meta-category"><?php 
    echo __('In', 'themeton') . ' ' . get_the_category_list(', ');
    ?>
</li>
									    <li itemprop="comment" class="meta-comment"><?php 
    echo comment_count_text();
    ?>
</li>
									    <li class="meta-like pulse"><?php 
    echo get_post_like(get_the_ID());
    ?>
</li>
									    <?php