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>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘posts-teaser-loop with post meta’ is closed to new replies.