Ejemplo n.º 1
0
function add_shortcode_blog($atts)
{
    extract(shortcode_atts(array('categories' => '', 'count' => 4), $atts));
    $output = '';
    $output .= '<div class="blog-post-shortcode">';
    $i = 0;
    $args = array("post_type" => "post", "posts_per_page" => $count, "cat" => $categories);
    query_posts($args);
    while (have_posts()) {
        the_post();
        $output .= '<div class="post-home three columns">';
        $output .= '<div class="post-format-wrap">';
        $output .= tf_get_post_format(array('image' => array('width' => 420, 'height' => 290), 'gallery' => array('width' => 420, 'height' => 290), 'video' => array('width' => 420, 'height' => 290)));
        $output .= '</div>';
        $output .= '<h4><a href="' . get_permalink() . '">' . get_the_title() . '</a></h4>';
        $output .= '<div>' . get_the_date('d M, Y') . ' &nbsp;-&nbsp; ' . get_comments_number() . ' ' . __('comments', THEME_SLUG) . '</div>';
        $output .= '<p>' . tf_the_excerpt_max_charlength(120) . '</p>';
        $output .= '</div>';
    }
    wp_reset_query();
    wp_reset_postdata();
    $output .= '</div>';
    $output .= '<div class="clear"></div>';
    return $output;
}
Ejemplo n.º 2
0
            ?>
	
	</div>
	<div class="clear"></div>
	
<?php 
            break;
        case 4:
            ?>

	<div id="blog-posts" class="nine columns float-right omega">
	
		<div class="post-format-wrap">
	
			<?php 
            echo tf_get_post_format(array('image' => array('width' => 700, 'height' => 0), 'gallery' => array('width' => 700, 'height' => 0), 'video' => array('width' => 700, 'height' => 393)));
            ?>
		
		</div>
		
		<?php 
            the_content();
            ?>
		
		<?php 
            tf_social_buttons();
            ?>
		
	</div>

	<div id="sidebar" class="three columns alpha">
Ejemplo n.º 3
0
    while (have_posts()) {
        the_post();
        ?>

<div id="post-<?php 
        the_ID();
        ?>
" <?php 
        post_class('post');
        ?>
>

	<div class="post-format-wrap">
	
		<?php 
        echo tf_get_post_format(array('image' => array('width' => 260, 'height' => 180), 'gallery' => array('width' => 260, 'height' => 180), 'video' => array('width' => 260, 'height' => 180)));
        ?>

	</div>
	<div class="post-content">
		<h4><span class="post-type format-<?php 
        echo get_post_format();
        ?>
post"></span><a href="<?php 
        the_permalink();
        ?>
"><?php 
        the_title();
        ?>
</a></h4>
		<div class="details"><?php