Пример #1
0
 function supernova_ajax_posts_content($post_ids, $outer_class, $inner_class)
 {
     global $post;
     echo '<div class="' . $outer_class . '">';
     $post_content = get_posts(array('posts_per_page' => count($post_ids), 'post__in' => $post_ids, 'post_status' => 'publish', 'ignore_sticky_posts' => true, 'orderby' => 'post__in'));
     foreach ($post_content as $post) {
         setup_postdata($post);
         echo '<article class="post ' . $inner_class . '">';
         echo '<h2 class="post_title"><a href="' . get_permalink() . '">' . get_the_title() . '</a></h2>';
         echo '<div class="entry">';
         echo '<a href="' . get_permalink() . '">' . supernova_thumbnail(get_the_ID()) . '</a>';
         echo '<p>' . the_excerpt() . '</p>';
         echo '</div>';
         get_template_part('includes/meta');
         echo '</article>';
     }
     echo '</div>';
     wp_reset_postdata();
 }
Пример #2
0
        ?>
 id="post-<?php 
        the_ID();
        ?>
">
        <h1 class="single_heading post_title entry-title"><?php 
        the_title();
        ?>
</h1>
        <?php 
        get_template_part('includes/before', 'post');
        ?>

       <div class="entry" id="entry">
            <span class="supernova_thumb"><?php 
        supernova_thumbnail(get_the_ID());
        ?>
</span>
                <?php 
        the_content();
        ?>

             <span class="page_links"><?php 
        wp_link_pages(array('before' => 'Pages: ', 'next_or_number' => 'number'));
        ?>
</span>
       </div>                                   
        <?php 
        edit_post_link(__('Edit this entry', 'Supernova'), '', '.');
        ?>