Title: posts-teaser-loop with post meta
Last modified: August 24, 2016

---

# posts-teaser-loop with post meta

 *  [72jogi](https://wordpress.org/support/users/72jogi/)
 * (@72jogi)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/posts-teaser-loop-with-post-meta/)
 * Hello I need help white the template code. I will show the own post_meta “_total_shares”
   with the Shares inside the meta_value_num. So whats wrong???
 *     ```
       <div class="su-posts su-posts-teaser-loop">
       	<?php
       		// Posts are found
       		if ( $posts->have_posts() ) {
       			while ( $posts->have_posts() ) :
       				$posts->the_post();
       				global $post;
       				?>
       				<div id="su-post-<?php the_ID(); ?>" class="su-post">
       					<?php if ( has_post_thumbnail() ) : ?>
       						<a class="su-post-thumbnail" href="<?php the_permalink(); ?>"><?php the_post_thumbnail(); ?></a>
       					<?php endif; ?>
       					<h2 class="su-post-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
                           <div class="su-post-meta">Christian <?php _e( 'Posted', 'su' ); ?>: <?php the_time( get_option( 'date_format' ) ); ?></div>
                           Likes <?php get_post_meta('_total_shares'); ?>
   
       				</div>
       				<?php
       			endwhile;
       		}
       		// Posts not found
       		else {
       			echo '<h4>' . __( 'Posts not found', 'su' ) . '</h4>';
       		}
       	?>
       </div>
       ```
   
 * [https://wordpress.org/plugins/shortcodes-ultimate/](https://wordpress.org/plugins/shortcodes-ultimate/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [72jogi](https://wordpress.org/support/users/72jogi/)
 * (@72jogi)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/posts-teaser-loop-with-post-meta/#post-6055009)
 * why does `get_post_meta('_total_shares');` not work inside the teaser-loop???
   any idea????
 *  Thread Starter [72jogi](https://wordpress.org/support/users/72jogi/)
 * (@72jogi)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/posts-teaser-loop-with-post-meta/#post-6055050)
 * no ideas?? i don’t understand why its not working

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘posts-teaser-loop with post meta’ is closed to new replies.

 * ![](https://ps.w.org/shortcodes-ultimate/assets/icon-256x256.gif?rev=2547563)
 * [Shortcodes Ultimate - Content Elements](https://wordpress.org/plugins/shortcodes-ultimate/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/shortcodes-ultimate/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/shortcodes-ultimate/)
 * [Active Topics](https://wordpress.org/support/plugin/shortcodes-ultimate/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/shortcodes-ultimate/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/shortcodes-ultimate/reviews/)

## Tags

 * [post](https://wordpress.org/support/topic-tag/post/)

 * 2 replies
 * 1 participant
 * Last reply from: [72jogi](https://wordpress.org/support/users/72jogi/)
 * Last activity: [11 years, 1 month ago](https://wordpress.org/support/topic/posts-teaser-loop-with-post-meta/#post-6055050)
 * Status: not resolved