示例#1
0
?>

 <article id="post-<?php 
the_ID();
?>
" <?php 
post_class();
?>
>
 	<div class="post-grid_wrapper">
 		<header class="entry-header">
 			<?php 
the_title('<h1 class="entry-title">', '</h1>');
?>
 			<?php 
kamome_note_post_thumbnail($post);
?>
 		</header><!-- .entry-header -->

 		<div class="entry-content">
 			<?php 
the_content();
?>
 			<?php 
wp_link_pages(array('before' => '<div class="page-links">' . esc_html__('Pages:', 'kamome-note'), 'after' => '</div>'));
?>
 		</div><!-- .entry-content -->

 		<footer class="entry-footer">
 		</footer><!-- .entry-footer -->
示例#2
0
function kamome_note_abbr_post($post)
{
    $thumbnail_class = has_post_thumbnail($post->ID) ? 'has-thumb' : 'no-thumb';
    //
    ?>
	<article id="post-<?php 
    echo $post->ID;
    ?>
" <?php 
    post_class('post-grid_wrapper ' . $thumbnail_class, $post->ID);
    ?>
>
		<header class="entry-header" data-scroll-scope>
			<?php 
    echo sprintf('<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url(get_permalink($post->ID))) . esc_html($post->post_title) . '</a></h2>';
    ?>
			<?php 
    if ('post' === $post->post_type) {
        ?>
			<div class="entry-meta">
				<?php 
        kamome_note_tag_and_category(array('post' => $post, 'class' => 'meta-element', 'echo_tags' => false, 'echo_categories' => true));
        kamome_note_posted_on(array('post' => $post, 'class' => 'meta-element', 'echo_time' => true, 'echo_author' => false));
        ?>
			</div><!-- .entry-meta -->
			<?php 
    }
    ?>
		</header><!-- .entry-header -->
		<div class="img_wrapper">
			<?php 
    kamome_note_post_thumbnail($post);
    ?>
		</div>
	</article><!-- #post-## -->
	<?php 
}