Example #1
0
 function et_postinfo_meta($postinfo, $date_format, $comment_zero, $comment_one, $comment_more)
 {
     global $themename;
     $postinfo_meta = '';
     if (in_array('author', $postinfo)) {
         $postinfo_meta .= ' ' . esc_html__('by', $themename) . ' ' . et_get_the_author_posts_link() . ' | ';
     }
     if (in_array('date', $postinfo)) {
         $postinfo_meta .= get_the_time($date_format) . ' | ';
     }
     if (in_array('categories', $postinfo)) {
         $postinfo_meta .= get_the_category_list(', ') . ' | ';
     }
     if (in_array('comments', $postinfo)) {
         $postinfo_meta .= et_get_comments_popup_link($comment_zero, $comment_one, $comment_more);
     }
     echo $postinfo_meta;
 }
Example #2
0
 function et_postinfo_meta($postinfo, $date_format, $comment_zero, $comment_one, $comment_more)
 {
     global $themename;
     $postinfo_meta = esc_html__('Posted', $themename);
     if (in_array('author', $postinfo) && 'project' !== get_post_type()) {
         $postinfo_meta .= ' ' . esc_html__('By', $themename) . ' ' . et_get_the_author_posts_link();
     }
     if (in_array('date', $postinfo)) {
         $postinfo_meta .= ' ' . esc_html__('on', $themename) . ' ' . get_the_time($date_format);
     }
     if (in_array('categories', $postinfo) && 'project' !== get_post_type()) {
         $postinfo_meta .= ' ' . esc_html__('in', $themename) . ' ' . get_the_category_list(', ');
     }
     if (in_array('comments', $postinfo)) {
         $postinfo_meta .= ' | ' . et_get_comments_popup_link($comment_zero, $comment_one, $comment_more);
     }
     echo $postinfo_meta;
 }
Example #3
0
 function et_postinfo_meta($postinfo, $date_format, $comment_zero, $comment_one, $comment_more, $project = false)
 {
     global $themename;
     $postinfo_meta = '';
     if (in_array('author', $postinfo)) {
         $postinfo_meta .= ' ' . esc_html__('by', $themename) . ' ' . et_get_the_author_posts_link();
     }
     if (in_array('date', $postinfo)) {
         $postinfo_meta .= ' ' . esc_html__('on', $themename) . ' ' . get_the_time($date_format);
     }
     if (in_array('categories', $postinfo)) {
         $postinfo_meta .= ' ' . esc_html__('in', $themename) . ' ' . ($project ? get_the_term_list(get_the_ID(), 'project_category', '', ', ', '') : get_the_category_list(', '));
     }
     if (in_array('comments', $postinfo)) {
         $postinfo_meta .= ' | ' . et_get_comments_popup_link($comment_zero, $comment_one, $comment_more);
     }
     if ('' != $postinfo_meta) {
         $postinfo_meta = __('Posted', $themename) . ' ' . $postinfo_meta;
     }
     echo $postinfo_meta;
 }
 function et_postinfo_meta()
 {
     echo '<p class="meta-info">';
     // Translators: 1 is author, 2 is category list.
     printf(__('Posted by %1$s in %2$s', 'Serene'), et_get_the_author_posts_link(), get_the_category_list(', '));
     echo '</p> <!-- .meta-info -->';
 }
				<article id="post-<?php 
    the_ID();
    ?>
" <?php 
    post_class('clearfix entry entry-content');
    ?>
>
				
					<h1 class="title"><?php 
    the_title();
    ?>
</h1>
					<p class="meta-info">
					<?php 
    printf(_x('Posted by %1$s in %2$s | %3$s', 'Meta information on single event page', 'Harmony'), et_get_the_author_posts_link(), get_the_term_list(get_the_ID(), 'event_category', '', ', '), et_get_comments_popup_link(__('0 comments', 'Harmony'), __('1 comment', 'Harmony'), '% ' . __('comments', 'Harmony')));
    ?>
					</p>
					
				<?php 
    $date_format = apply_filters('et_event_settings_date_format', 'D, M d, Y');
    $default_time_format = get_option('time_format');
    $et_event_startdate = get_post_meta(get_the_ID(), '_et_event_date', true);
    $et_event_enddate = get_post_meta(get_the_ID(), '_et_event_enddate', true);
    $et_event_location = get_post_meta(get_the_ID(), '_et_event_location', true);
    $et_event_venue = get_post_meta(get_the_ID(), '_et_event_venue', true);
    $et_event_price = get_post_meta(get_the_ID(), '_et_event_price', true);
    $et_purchase_link = get_post_meta(get_the_ID(), '_et_purchase_link', true);
    $event_startday = date($date_format, $et_event_startdate);
    $event_endday = date($date_format, $et_event_enddate);
    $event_starttime = date($default_time_format, $et_event_startdate);
								</div>
							<?php 
                        }
                        ?>

								<h2><a href="<?php 
                        the_permalink();
                        ?>
"><?php 
                        the_title();
                        ?>
</a></h2>

								<p class="post-meta">
								<?php 
                        printf(__('Posted by %s on %s in %s', 'Nexus'), et_get_the_author_posts_link(), get_the_time('n-d-y'), get_the_category_list(', '));
                        ?>
								</p>

								<p><?php 
                        truncate_post(200);
                        ?>
</p>
							</div> <!-- .popular-post -->
				<?php 
                        $i++;
                    }
                    wp_reset_postdata();
                    $et_popular_tabs_content = ob_get_clean();
                }
                ?>
Example #7
0
    the_ID();
    ?>
" <?php 
    post_class('clearfix entry entry-content');
    ?>
>

					<h1 class="title"><?php 
    the_title();
    ?>
</h1>
					<p class="meta-info">
					<?php 
    $gallery_date = get_post_meta(get_the_ID(), '_et_gallery_date', true);
    $et_gallery_date = '' != $gallery_date ? date_i18n(et_get_option('harmony_date_format', 'M j, Y'), $gallery_date) : et_get_option('harmony_date_format', 'M j, Y');
    printf(_x('Posted by %1$s in %2$s on %3$s | %4$s', 'Meta information on single gallery page', 'Harmony'), et_get_the_author_posts_link(), get_the_term_list(get_the_ID(), 'gallery_category', '', ', '), esc_html($et_gallery_date), et_get_comments_popup_link(__('0 comments', 'Harmony'), __('1 comment', 'Harmony'), '% ' . __('comments', 'Harmony')));
    ?>
					</p>

		<?php 
    $i = 0;
    $media = get_post_meta(get_the_ID(), '_et_used_images', true);
    $width = (int) apply_filters('et_gallery_image_width', 170);
    $height = (int) apply_filters('et_gallery_image_height', 170);
    if ($media) {
        ?>
						<div id="et-gallery-images" class="clearfix">
		<?php 
        foreach ((array) $media as $et_media) {
            $i++;
            if (is_numeric($et_media)) {
Example #8
0
function et_pb_blog($atts)
{
    extract(shortcode_atts(array('module_id' => '', 'module_class' => '', 'fullwidth' => 'on', 'posts_number' => 10, 'include_categories' => '', 'meta_date' => 'M j, Y', 'show_thumbnail' => 'on', 'show_content' => 'off', 'show_author' => 'on', 'show_date' => 'on', 'show_categories' => 'on', 'show_pagination' => 'on', 'background_layout' => 'light', 'show_more' => 'off'), $atts));
    global $paged;
    $container_is_closed = false;
    if ('on' !== $fullwidth) {
        wp_enqueue_script('jquery-masonry-3');
    }
    $args = array('posts_per_page' => (int) $posts_number);
    $et_paged = is_front_page() ? get_query_var('page') : get_query_var('paged');
    if (is_front_page()) {
        $paged = $et_paged;
    }
    if ('' !== $include_categories) {
        $args['cat'] = $include_categories;
    }
    if (!is_search()) {
        $args['paged'] = $et_paged;
    }
    ob_start();
    query_posts($args);
    if (have_posts()) {
        while (have_posts()) {
            the_post();
            $post_format = get_post_format();
            $thumb = '';
            $width = 'on' === $fullwidth ? 1080 : 400;
            $width = (int) apply_filters('et_pb_blog_image_width', $width);
            $height = 'on' === $fullwidth ? 675 : 250;
            $height = (int) apply_filters('et_pb_blog_image_height', $height);
            $classtext = 'on' === $fullwidth ? 'et_pb_post_main_image' : '';
            $titletext = get_the_title();
            $thumbnail = get_thumbnail($width, $height, $classtext, $titletext, $titletext, false, 'Blogimage');
            $thumb = $thumbnail["thumb"];
            $no_thumb_class = '' === $thumb || 'off' === $show_thumbnail ? ' et_pb_no_thumb' : '';
            if (in_array($post_format, array('video', 'gallery'))) {
                $no_thumb_class = '';
            }
            ?>

		<article id="post-<?php 
            the_ID();
            ?>
" <?php 
            post_class('et_pb_post' . $no_thumb_class);
            ?>
>

		<?php 
            et_divi_post_format_content();
            if (!in_array($post_format, array('link', 'audio', 'quote'))) {
                if ('video' === $post_format && false !== ($first_video = et_get_first_video())) {
                    printf('<div class="et_main_video_container">
							%1$s
						</div>', $first_video);
                } elseif ('gallery' === $post_format) {
                    et_gallery_images();
                } elseif ('' !== $thumb && 'on' === $show_thumbnail) {
                    if ('on' !== $fullwidth) {
                        echo '<div class="et_pb_image_container">';
                    }
                    ?>
						<a href="<?php 
                    the_permalink();
                    ?>
">
							<?php 
                    print_thumbnail($thumb, $thumbnail["use_timthumb"], $titletext, $width, $height);
                    ?>
						</a>
				<?php 
                    if ('on' !== $fullwidth) {
                        echo '</div> <!-- .et_pb_image_container -->';
                    }
                }
            }
            ?>

		<?php 
            if ('off' === $fullwidth || !in_array($post_format, array('link', 'audio', 'quote', 'gallery'))) {
                ?>
			<?php 
                if (!in_array($post_format, array('link', 'audio'))) {
                    ?>
				<h2><a href="<?php 
                    the_permalink();
                    ?>
"><?php 
                    the_title();
                    ?>
</a></h2>
			<?php 
                }
                ?>

			<?php 
                if ('on' === $show_author || 'on' === $show_date || 'on' === $show_categories) {
                    printf('<p class="post-meta">%1$s %2$s %3$s %4$s %5$s</p>', 'on' === $show_author ? sprintf(__('by %s', 'Divi'), et_get_the_author_posts_link()) : '', 'on' === $show_author && 'on' === $show_date ? ' | ' : '', 'on' === $show_date ? sprintf(__('%s', 'Divi'), get_the_date($meta_date)) : '', ('on' === $show_author || 'on' === $show_date) && 'on' === $show_categories ? ' | ' : '', 'on' === $show_categories ? get_the_category_list(', ') : '');
                }
                if ('on' === $show_content) {
                    global $more;
                    $more = null;
                    the_content(__('read more...', 'Divi'));
                } else {
                    if (has_excerpt()) {
                        the_excerpt();
                    } else {
                        truncate_post(270);
                    }
                    $more = 'on' == $show_more ? sprintf(' <a href="%1$s" class="more-link" >%2$s</a>', esc_url(get_permalink()), __('read more', 'Divi')) : '';
                    echo $more;
                }
                ?>
		<?php 
            }
            // 'off' === $fullwidth || ! in_array( $post_format, array( 'link', 'audio', 'quote', 'gallery'
            ?>

		</article> <!-- .et_pb_post -->
<?php 
        }
        // endwhile
        if ('on' === $show_pagination && !is_search()) {
            echo '</div> <!-- .et_pb_posts -->';
            $container_is_closed = true;
            if (function_exists('wp_pagenavi')) {
                wp_pagenavi();
            } else {
                get_template_part('includes/navigation', 'index');
            }
        }
        wp_reset_query();
    } else {
        get_template_part('includes/no-results', 'index');
    }
    $posts = ob_get_contents();
    ob_end_clean();
    $class = " et_pb_bg_layout_{$background_layout}";
    $output = sprintf('<div%5$s class="%1$s%3$s%6$s">
			%2$s
		%4$s', 'on' === $fullwidth ? 'et_pb_posts' : 'et_pb_blog_grid clearfix', $posts, esc_attr($class), !$container_is_closed ? '</div> <!-- .et_pb_posts -->' : '', '' !== $module_id ? sprintf(' id="%1$s"', esc_attr($module_id)) : '', '' !== $module_class ? sprintf(' %1$s', esc_attr($module_class)) : '');
    if ('on' !== $fullwidth) {
        $output = sprintf('<div class="et_pb_blog_grid_wrapper">%1$s</div>', $output);
    }
    return $output;
}
Example #9
0
            echo get_the_time('M');
            ?>
<strong><?php 
            echo get_the_time('d');
            ?>
</strong></span>

					<h2><a href="<?php 
            the_permalink();
            ?>
"><?php 
            the_title();
            ?>
</a></h2>
					<p class="meta-info"><?php 
            printf(__('Posted on %1$s by %2$s', 'Flexible'), get_the_time(apply_filters('et_home_post_date_format', 'M j')), et_get_the_author_posts_link());
            ?>
</p>
					<p><?php 
            truncate_post(180);
            ?>
</p>
				</article> <!-- end .blog-item -->
			<?php 
        }
    } else {
        ?>
				<article id="post-0" class="post no-results not-found">
					<h2 class="entry-title"><?php 
        _e('Nothing Found', 'Flexible');
        ?>
Example #10
0
    comments_number('0', '1', '%');
    ?>
</span></span>
				</div>

				<div class="post-description">
					<h2><a href="<?php 
    echo esc_url($more_link);
    ?>
"><?php 
    the_title();
    ?>
</a></h2>
					<p class="post-meta">
					<?php 
    printf(__('Posted by %s on %s', 'Nexus'), et_get_the_author_posts_link(), get_the_time(et_get_option('nexus_date_format', 'M j, Y')));
    ?>
					</p>
				</div>

				<div class="post-excerpt">
					<div class="excerpt-wrap">
						<a href="<?php 
    echo esc_url($more_link);
    ?>
" class="post-title"><?php 
    the_title();
    ?>
</a>
                        <a href="<?php 
    echo esc_url($more_link);
		<a href="<?php 
    the_permalink();
    ?>
">
			<?php 
    print_thumbnail($thumb, $thumbnail["use_timthumb"], $title, $width, $height);
    ?>
		</a>
	</div>
<?php 
}
?>
	<div class="et-description">
		<h2><a href="<?php 
the_permalink();
?>
"><?php 
the_title();
?>
</a></h2>
		<p class="post-meta">
		<?php 
printf(__('<span>%s</span>Posted by %s in %s', 'Nexus'), get_the_time('M j'), et_get_the_author_posts_link(), get_the_category_list(', '));
?>
		</p>
		<p><?php 
et_nexus_truncate_post(177);
?>
</p>
	</div>
</div>