コード例 #1
0
        } else {
            ?>
						<div class="hentry-wrap">
							<?php 
            if ($layout_style == 'list') {
                ?>
								<?php 
                $entry_featured_class = '';
                dh_post_featured('', '', true, false, $entry_featured_class, '', false);
                ?>
							<?php 
            } else {
                ?>
								<?php 
                $entry_featured_class = '';
                dh_post_featured('', '', true, false, $entry_featured_class, '', true);
                ?>
							<?php 
            }
            ?>

							<div class="entry-info">

								<div class="entry-header">
									<h3 class="entry-title" data-itemprop="name">
										<a href="<?php 
            the_permalink();
            ?>
" title="<?php 
            echo esc_attr(get_the_title());
            ?>
コード例 #2
0
ファイル: functions.php プロジェクト: mysia84/mnassalska
function dh_related_post()
{
    global $post;
    $categories = get_the_category($post->ID);
    if (!$categories) {
        return;
    }
    $args = array('posts_per_page' => 3, 'post__not_in' => array($post->ID), 'orderby' => 'rand', 'meta_key' => "_thumbnail_id", 'category__in' => wp_get_post_categories($post->ID));
    $related = new WP_Query($args);
    if ($related->have_posts()) {
        ?>
<div class="related-post">
	<div class="related-post-title">
		<h3><span><?php 
        echo __("You may also like", DH_DOMAIN);
        ?>
</span></h3>
	</div>
	<div class="row related-post-items">
		<?php 
        while ($related->have_posts()) {
            $related->the_post();
            global $post;
            ?>
			<div class="related-post-item col-md-4 col-sm-6">
				<?php 
            dh_post_featured('', '', false, true);
            ?>
				<div class="entry-meta top-meta">
				<?php 
            dh_post_meta(true, false, false, false, true, ', ');
            ?>
				</div>
				<h4 class="post-title" data-itemprop="name"><a href="<?php 
            the_permalink();
            ?>
"><?php 
            the_title();
            ?>
</a></h4>
				<div class="excerpt">
				<?php 
            $excerpt = $post->post_excerpt;
            if (empty($excerpt)) {
                $excerpt = $post->post_content;
            }
            $excerpt = strip_shortcodes($excerpt);
            $excerpt = wp_trim_words($excerpt, 15, '...');
            echo '<p>' . $excerpt . '</p>';
            ?>
				</div>
				<div class="entry-meta bottom-meta">
				<?php 
            dh_post_meta(false, true, false, true, true, ', ');
            ?>
				</div>
				<div class="readmore-link">
					<a href="<?php 
            the_permalink();
            ?>
"><?php 
            _e("Read More", DH_THEME_DOMAIN);
            ?>
</a>
				</div>
			</div>
		<?php 
        }
        ?>
	</div>
</div>
	<?php 
    }
    wp_reset_postdata();
}
コード例 #3
0
ファイル: search.php プロジェクト: mysia84/mnassalska
													</a>
												</div>
											</div>
										</div>
										<?php 
        } else {
            ?>
										<div class="hentry-wrap">
											<?php 
            $entry_featured_class = '';
            ?>
											<?php 
            if (empty($hide_thumbnail)) {
                ?>
											<?php 
                dh_post_featured('', '', true, false, $entry_featured_class, $layout);
                ?>
											<?php 
            }
            ?>
											<div class="entry-info">
												<div class="entry-header">
													<?php 
            /* if($layout != 'default' && $layout != 'medium'  && $layout != 'timeline'):*/
            ?>
													<div class="entry-meta top-meta">
														<?php 
            dh_post_meta($show_date, false, false, false, true, ', ');
            ?>
													</div>
													<?php 
コード例 #4
0
ファイル: single.php プロジェクト: jonasbelcina/platinumdxb
        the_post();
        $post_format = get_post_format();
        ?>
						<article id="post-<?php 
        the_ID();
        ?>
" <?php 
        post_class();
        ?>
 itemtype="<?php 
        echo dh_get_protocol();
        ?>
://schema.org/Article" itemscope="">
							<div class="hentry-wrap">
								<?php 
        dh_post_featured();
        ?>
								<div class="entry-header">
									<h1 class="entry-title" data-itemprop="name"><?php 
        the_title();
        ?>
</h1>
									<div class="entry-meta icon-meta">
										<?php 
        dh_post_meta($blog_show_date, $blog_show_comment, $blog_show_category, $blog_show_author, true, false, null, true);
        ?>
									</div>
								</div>
								<div class="entry-content" data-itemprop="mainContentOfPage">
									<?php 
        the_content(esc_html__('Continue reading &hellip;', 'woow'));