Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!-- Charisma: posts-loop.php -->
- <?php if (is_search()) { ?>
- <h1 class="page_title"><?php _e('Search results for ','theme'); echo ' "'.$s.'"'; ?></h1>
- <?php } ?>
- <?php if (is_author()) { ?>
- <?php
- $curauth = (isset($_GET['author_name'])) ? get_user_by('slug', $author_name) : get_userdata(intval($author));
- ?>
- <h1 class="page_title"><?php _e('Written by: "'.$curauth->display_name.'"','theme'); ?></h1>
- <?php } ?>
- <?php if (is_archive()) {
- $term = $wp_query->get_queried_object();
- $taxonomy = get_taxonomy( $term->taxonomy );
- ?>
- <?php if (is_category()) { ?>
- <h1 class="page_title"><?php _e('Category: ', 'theme'); echo $term->name; ?></h1>
- <?php } ?>
- <?php if (is_tag()) { ?>
- <h1 class="page_title"><?php _e('Tagged by: ', 'theme'); echo $term->name; ?></h1>
- <?php } ?>
- <?php if (is_date() ) { ?>
- <h1 class="page_title"><?php _e('Archives for: ', 'theme'); ?>
- <?php if ( is_day() )
- echo get_the_time( 'F j, Y' );
- elseif ( is_month() )
- echo single_month_title( ' ', false );
- elseif ( is_year() )
- echo get_the_time( 'Y' );
- }
- ?>
- </h1>
- <?php } ?>
- <?php if ( have_posts() ) : while ( have_posts() ) : the_post();
- $post_format = get_post_format();
- $hide_feature = get_post_meta($post->ID, 'mom_hide_fi', true);
- global $posts_st;
- $extra = get_post_meta(get_the_ID(), $posts_st->get_the_id(), TRUE);
- if (isset($extra['aside_embed'])) { $aside_embed = $extra['aside_embed']; }
- if (isset($extra['status_embed'])) { $status_embed = $extra['status_embed']; }
- if (isset($extra['link_url'])) { $link_url = $extra['link_url']; }
- ?>
- <article <?php post_class('chr_post');?>>
- <?php if ($post_format != 'aside' && $post_format != 'status' && $post_format != 'link') { ?>
- <div class="post_title_wrap">
- <?php if(is_single()) { ?>
- <h2 class="post_title"><?php the_title(); ?></h2>
- <?php } else { ?>
- <h2 class="post_title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
- <?php } ?>
- <?php if (mom_option('disable_post_format') != true) { ?>
- <span class="post_type"></span>
- <?php } ?>
- </div>
- <?php } else { ?>
- <?php if (mom_option('disable_post_format') != true) { ?>
- <span class="post_type"></span>
- <?php } ?>
- <?php } ?>
- <div class="post_content">
- <?php
- if ($post_format != 'gallery' && $post_format != 'video') {
- if ($hide_feature != true) {
- if ( has_post_thumbnail() ) {
- the_post_thumbnail();
- }
- }
- }
- ?>
- <?php if ($post_format == 'audio') { ?>
- <?php get_template_part('post', 'audio'); ?>
- <?php } elseif ($post_format == 'video') { ?>
- <?php get_template_part('post', 'video'); ?>
- <?php } elseif ($post_format == 'quote') { ?>
- <blockquote class="quote_post">
- <a href="<?php the_permalink(); ?>"><?php the_content(false); ?></a>
- </blockquote>
- <?php } elseif ($post_format == 'aside') { ?>
- <?php if (!empty($aside_embed)) { ?>
- <div class="embed_notes_wrap">
- <?php echo $aside_embed; ?>
- </div>
- <?php } else { ?>
- <div class="mom_post_note border-box">
- <?php the_content(false); ?>
- </div>
- <div class="mom_note_shadow mom_visibility_desktop"></div>
- <?php } ?>
- <?php } elseif ($post_format == 'status') { ?>
- <?php if (!empty($status_embed)) { ?>
- <div class="embed_notes_wrap">
- <?php echo $status_embed; ?>
- </div>
- <?php } else { ?>
- <div class="mom_post_note border-box">
- <?php the_content(false); ?>
- </div>
- <div class="mom_note_shadow mom_visibility_desktop"></div>
- <?php } ?>
- <?php } elseif ($post_format == 'link') { ?>
- <div class="link_post">
- <h2 class="the_link"><a href="<?php echo $link_url; ?>" target="_blank"><?php the_title(); ?></a></h2>
- <?php the_content(false); ?>
- </div>
- <?php } elseif ($post_format == 'chat') { ?>
- <?php the_content(false); ?>
- <?php if (!is_single()) { ?>
- <?php } ?>
- <?php } elseif ($post_format == 'gallery') { ?>
- <?php get_template_part('post', 'gallery'); ?>
- <?php } ?>
- <?php if ($post_format != 'quote' && $post_format != 'aside' && $post_format != 'status' && $post_format != 'link' && $post_format != 'chat') { ?>
- <div class="mom_visibility_desktop">
- <?php if (is_search()) { ?>
- <?php
- $excerpt = strip_shortcodes(get_the_content());
- echo '<p>'.wp_html_excerpt($excerpt, 250, '...').'</p>';
- ?>
- <?php } else { ?>
- <?php the_content(false); ?>
- <?php } ?>
- </div>
- <div class="mom_visibility_mobile">
- <?php if (!is_single()) { ?>
- <?php
- $excerpt = strip_shortcodes(get_the_content());
- echo '<p>'.wp_html_excerpt($excerpt, 120, '...').'</p>';
- ?>
- <?php } else { ?>
- <?php the_content(false); ?>
- <?php } ?>
- </div>
- <?php if (!is_single()) { ?>
- <?php } ?>
- <?php } ?>
- <?php wp_link_pages(); ?>
- </div><!--End Post Content-->
- <div class="clear"></div>
- <?php if (is_single()) { ?>
- <?php if (has_tag()) { ?>
- <div class="post_tags">
- <?php the_tags('', ', ', ''); ?>
- </div><!--End Post Tags-->
- <?php } ?>
- <?php } ?>
- <?php if ($post_format != 'aside' && $post_format != 'status' && $post_format != 'link') { ?>
- <div class="post_meta">
- <span class="admin">
- <?php
- $author_name = get_the_author_meta('nickname');
- if(function_exists('icl_register_string')) {
- icl_register_string('Author', 'author name', get_the_author_meta('nickname'));
- $author_name = icl_t('Author', 'author name', get_the_author_meta('nickname'));
- }
- ?>
- <a href="<?php echo get_author_posts_url(get_the_author_meta('ID')); ?>"><?php echo $author_name; ?></a>
- </span>
- <span class="date"><?php the_time(mom_option('date_format')); ?></span>
- <span class="comment_count mom_visibility_desktop">
- <a href="<?php comments_link(); ?>"><?php comments_number(__('No Comments', 'theme'), __('1 Comment', 'theme'), __('% Comments', 'theme')); ?></a>
- </span>
- <span class="comment_count mom_visibility_mobile last">
- <a href="<?php comments_link(); ?>"><?php comments_number(0, __('1', 'theme'), __('%', 'theme')); ?></a>
- </span>
- <?php if(function_exists('the_views')) { ?><span class="views"><?php _e('Views: ','theme'); ?><?php the_views(); ?></span><?php } ?>
- <span class="cat"><?php the_category(', '); ?></span>
- <div class="clear"></div>
- </div> <!--End Post Meta-->
- <?php } ?>
- </article><!--End Post-->
- <?php endwhile; else: ?>
- <p class="noposts"><?php _e('Sorry, no posts matched your criteria.', 'theme'); ?></p>
- <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement