Excerpt when no More tag
-
Hey, ok, so I have a bit of a problem here. I have a blog/magazine, and I use the more tag to create an excerpt on my home page. However, some posts have videos at the top where the wp featured image should go, so I want it to be like this:
when there is no more tag, the excerpt that it manually put in the excerpt form is loaded.
My website is https://www.freshstreetmag.com. You can see the problem in the 8-Bit Tron Legacy post. I didn’t use a more tag in that one, and instead, I want the excerpt, but the whole post is there.
My current code is as follows:
<div class="postthumb"> <a href="<?php the_permalink(); ?>" title="<?php printf( __('Permalink to %s', 'shape'), the_title_attribute('echo=0') ); ?>" rel="bookmark"><img src="<?php bloginfo('template_directory'); ?>/scripts/timthumb.php?src=<?php echo get_post_meta($post->ID, "thumb", $single = true); ?>&h=200&w=270&zc=1" alt="<?php the_title(); ?>" class="post-thumb" /></a> </div> <div class="postsummary"> <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( __('Permalink to %s', 'shape'), the_title_attribute('echo=0') ); ?>" rel="bookmark"><?php the_title(); ?></a></h2> <div class="entry-meta-sm"> <span class="meta-prep meta-prep-entry-date"><?php _e('Published ', 'shape'); ?></span> <span class="entry-date"><?php the_time( get_option( 'date_format' ) ); ?></span> </div><!-- .entry-meta --> <div class="entry-content"> <?php $content = get_the_content(''); $content = apply_filters('the_content', $content); echo wpt_strip_content_tags($content); ?> <?php wp_link_pages('before=<div class="page-link">' . __( 'Pages:', 'shape' ) . '&after=</div>') ?> </div><!-- .entry-content --> <div class="alignright"> <a href="<?php the_permalink(); ?>" class="readmore">Read More</a> </div><!-- .alignright --> </div>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Excerpt when no More tag’ is closed to new replies.