コード例 #1
0
ファイル: single.php プロジェクト: ftopolovec/proart
					<div class="description">
						<?php 
            the_author_meta("description");
            ?>
					</div>
				</div>
			</div>
			<?php 
        }
        ?>

			<?php 
        if ($smof_data['related_posts'] && get_post_meta($post->ID, 'pyre_related_posts', true) != 'no' || !$smof_data['related_posts'] && get_post_meta($post->ID, 'pyre_related_posts', true) == 'yes') {
            ?>
			<?php 
            $related = get_related_posts($post->ID, $smof_data['number_related_posts']);
            ?>
			<?php 
            if ($related->have_posts()) {
                ?>
			<div class="related-posts single-related-posts">
				<div class="fusion-title title"><h2 class="title-heading-left"><?php 
                echo __('Related Posts', 'Avada');
                ?>
</h2><div class="title-sep-container"><div class="title-sep sep-double"></div></div></div>
				<div id="carousel" class="es-carousel-wrapper fusion-carousel-large">
					<div class="es-carousel">
						<ul>
							<?php 
                while ($related->have_posts()) {
                    $related->the_post();
コード例 #2
0
</h3>
                                <?php 
        the_author_meta('description');
        ?>
                                <div class="clear"></div>
                            </div>
                        </div>
                     <?php 
    }
    ?>
   
                     <?php 
    if ($data['related_posts']) {
        ?>
					 <?php 
        $relate = get_related_posts($post->ID, $items);
        ?>
							<?php 
        if ($relate->have_posts()) {
            ?>
							<div class="posts-boxes">
								<div class="content_box_title">
                                	<span class="white smaller"><?php 
            _e('Related Posts', 'Creativo');
            ?>
</span>
                                </div>
                                <div class="recent_posts_container">
                                	<?php 
            $count = 1;
            $i = 3;
コード例 #3
0
ファイル: single.php プロジェクト: bulats/chef
					<div class="description">
						<?php 
        the_author_meta("description");
        ?>
					</div>
				</div>
			</div>
			<?php 
    }
    ?>

			<?php 
    if ($data['related_posts']) {
        ?>
			<?php 
        $related = get_related_posts($post->ID);
        ?>
			<?php 
        if ($related->have_posts() && get_post_meta($post->ID, 'pyre_related_posts', true) != 'no') {
            ?>
			<div class="related-posts single-related-posts">
				<div class="title"><h2><?php 
            echo __('Related Posts', 'Avada');
            ?>
</h2><div class="title-sep-container"><div class="title-sep"></div></div></div>
				<div id="carousel" class="es-carousel-wrapper">
					<div class="es-carousel">
						<ul>
							<?php 
            while ($related->have_posts()) {
                $related->the_post();
コード例 #4
0
ファイル: single.php プロジェクト: verbazend/AWFA
			<?php if($data['author_info']): ?>
			<div class="about-author">
				<div class="title"><h2><?php echo __('About the Author:', 'Avada'); ?> <?php the_author_posts_link(); ?></h2><div class="title-sep-container"><div class="title-sep"></div></div></div>
				<div class="about-author-container">
					<div class="avatar">
						<?php echo get_avatar(get_the_author_meta('email'), '72'); ?>
					</div>
					<div class="description">
						<?php the_author_meta("description"); ?>
					</div>
				</div>
			</div>
			<?php endif; ?>

			<?php if($data['related_posts']): ?>
			<?php $related = get_related_posts($post->ID, $data['number_related_posts']); ?>
			<?php if($related->have_posts() && get_post_meta($post->ID, 'pyre_related_posts', true) != 'no'): ?>
			<div class="related-posts single-related-posts">
				<div class="title"><h2><?php echo __('Related Posts', 'Avada'); ?></h2><div class="title-sep-container"><div class="title-sep"></div></div></div>
				<div id="carousel" class="es-carousel-wrapper">
					<div class="es-carousel">
						<ul>
							<?php while($related->have_posts()): $related->the_post(); ?>
							<?php if(has_post_thumbnail()): ?>
							<li>
								<div class="image" aria-haspopup="true">
									<?php if($data['image_rollover']): ?>
									<?php the_post_thumbnail('related-img'); ?>
									<?php else: ?>
									<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_post_thumbnail('related-img'); ?></a>
									<?php endif; ?>
コード例 #5
0
/** 
 * Template tag to check if the current post has related posts. 
 *
 * @since 1.1
 * @author Paul Hughes
 * @param string $tags comma-separated list of tags.
 * @param int $count number of related posts to return.
 * @param string $blog the blog from which to fetch the related posts.
 * @param bool $only_display_related whether to display only related posts or others as well.
 * @param string $post_type the type of post to return.
 * @return bool whether the current post has related posts or not.
 */
function tribe_has_related_posts($tag = false, $category = false, $count = 5, $blog = false, $only_display_related = false, $post_type = 'post')
{
    $posts = get_related_posts($tag, $count, $blog, $only_display_related, $post_type);
    return apply_filters('tribe-has-related-posts', count($posts) > 0);
}
コード例 #6
0
        get_ad('post-bottom');
        ?>
			</div>
			<div class="extras">
				<h3 class="section-title">About The Author</h3>
				<div class="divider cat-background bottom_margins"></div>
				<?php 
        author_biography($author_id);
        ?>
			</div>
			
			<div class="extras">
				<h3 class="section-title">Related</h3>
				<div class="divider cat-background bottom_margins"></div>
				<?php 
        get_related_posts(array('category' => $category->term_id));
        ?>
			</div>
			
			<?php 
        /*
        			<div class="extras">
        				<h3 class="section-title">More By <strong><?php echo $author_username; ?></strong></h3>
        				<div class="divider cat-background bottom_margins"></div>
        				<?php get_related_posts(array('author_id' => $author_id)); ?>
        			</div> */
        ?>
			
			<div class="comments" id="comments">                        	
				<h3 class="section-title">Comments</h3>
				<div class=" divider cat-background"></div>
コード例 #7
0
<div class="col-md-4 visible-md visible-lg">
	<div id="sidebar">
	
   			<?php 
get_ad('sidebar-top');
?>
    
    		<div class="widget">
				<h2 class="cat-border">What's Hot</h2>
				<?php 
global $exclude_posts;
get_related_posts(array('type' => 'stack'));
?>
			</div>
			
				
			<?php 
if (function_exists('vote_poll') && !in_pollarchive()) {
    ?>
				<div class="widget">
					<h2 class="cat-border">Vote</h2>
					<div class="poll-wrapper">
						<ul>
							<li><?php 
    get_poll();
    ?>
</li>
						</ul>
					</div>
				</div>
			<?php 
コード例 #8
0
ファイル: single.php プロジェクト: rexington/theopenstandard
            <hr>
            
            <div class="post-content">
                <?php 
        the_content();
        ?>
            </div>

            <?php 
        edit_post_link(__('Edit this entry', 'html5reset'), '', '.');
        ?>

            <hr class="tall">

            <?php 
        echo get_related_posts();
        ?>
               
            <?php 
        comments_template();
        ?>

        </div>
    </div>

   
    <?php 
        $adjacent = get_adjacent_posts_from_category($post, get_primary_category($post));
        $next = $adjacent['next'];
        $prev = $adjacent['prev'];
        if ($prev) {
コード例 #9
0
<?php

$related_query = get_related_posts();
if ($related_query->have_posts()) {
    ?>

    <div class="col s1 feed-category">
      <span class="rotate-text font-condensed">
        Relacionados
      </span>
    </div>

    <div class="col s7">

<?php 
    while ($related_query->have_posts()) {
        $related_query->the_post();
        ?>
      <article <?php 
        post_class('small-post theme-border-color u-cf');
        ?>
 id="post-<?php 
        the_ID();
        ?>
">

        <a href="<?php 
        the_permalink();
        ?>
">
コード例 #10
0
ファイル: functions.php プロジェクト: EddieRingle/wicketpixie
function print_related_posts($form = 'list', $numToShow = 5)
{
    $related_posts = get_related_posts($numToShow);
    if ($related_posts !== NULL) {
        switch ($form) {
            case 'list':
                ?>
            <ul class="related-posts">
                <?php 
                foreach ($related_posts as $title => $url) {
                    ?>
                <li class="related-post"><a href="<?php 
                    echo $url;
                    ?>
"><?php 
                    echo $title;
                    ?>
</a></li>
                <?php 
                }
                ?>
            </ul>
            <?php 
                break;
            default:
                break;
        }
    }
}