Пример #1
0
    function manduca_display_excerpt()
    {
        ?>
				<div class="excerpt-wrapper">
	
				<?php 
        /* Start the Loop */
        while (have_posts()) {
            the_post();
            ?>
					
					<article id="post-<?php 
            the_ID();
            ?>
" <?php 
            post_class();
            ?>
  >
						
						<header class="excerpt-header">
							<?php 
            manduca_display_entry_header();
            ?>
						</header>
						
						<?php 
            edit_post_link(__('Edit', 'manduca'), '<span class="edit-link"><i class="fa fa-pencil" aria-hidden="true"></i> ', '</span>');
            ?>
						
							<?php 
            if (has_post_thumbnail()) {
                ?>
							<div class="crop-height">
								<?php 
                the_post_thumbnail('excerpt-size');
                ?>
							</div>
							
							<div class="excerpt-entry has-thumbnail">
						
						<?php 
            } else {
                ?>
							<div class="excerpt-entry no-thumbnail">
						<?php 
            }
            ?>
				
						
							<?php 
            if (strpos(get_the_content(), 'more-link') === false) {
                the_excerpt();
            } else {
                the_content();
            }
            ?>
							</div>
						<div class='clearfix-content'></div>
					</article>				
				<?php 
        }
        manduca_page_navigation();
        ?>
				</div>
	<?php 
    }
Пример #2
0
			<?php 
    /* Start the Loop */
    ?>
			<?php 
    while (have_posts()) {
        the_post();
        ?>
				<?php 
        get_template_part('content');
        ?>
			<?php 
    }
    ?>

			<?php 
    manduca_page_navigation();
    ?>

		<?php 
} else {
    ?>

			<article id="post-0" class="post no-results not-found">

			<?php 
    if (current_user_can('edit_posts')) {
        ?>
				<header class="entry-header">
					<h1 class="entry-title"><?php 
        _e('No post', 'manduca');
        ?>
Пример #3
0
function manduca_display_in_two_columns()
{
    ?>
				<div class="excerpt-wrapper">

			<?php 
    /* Start the Loop */
    $post_counter = 1;
    while (have_posts()) {
        the_post();
        ?>
				
				<article id="post-<?php 
        the_ID();
        ?>
" <?php 
        post_class();
        ?>
 itemscope="itemscope" itemtype="http://schema.org/BlogPosting" itemprop="blogPost" >
				<?php 
        if (has_post_thumbnail()) {
            ?>
					<div class="crop-height">
						<?php 
            the_post_thumbnail();
            ?>
					</div>
				<?php 
        }
        ?>
		
				<h2 class="entry-title"  itemprop="headline">
					<a href="<?php 
        the_permalink();
        ?>
" rel="bookmark"><?php 
        the_title();
        ?>
</a>
				</h2>
				<?php 
        if (strpos(get_the_content(), 'more-link') === false) {
            the_excerpt();
        } else {
            the_content();
        }
        ?>
				
				</article>
				<?php 
        if ($post_counter % 2 == 0) {
            echo '<div class="vonalzo"></div>';
        }
        ?>

			<?php 
        $post_counter++;
    }
    manduca_page_navigation();
    ?>
			</div>
<?php 
}