Shot title and excerpt if has thumbnail
-
Using this code that check for a thumbnail and adds it. If there is a thumbnail I also want to show title of post and the post excerpt. i use this code which does not work:
<div id="1" > <?php if ( function_exists( 'add_theme_support' ) && has_post_thumbnail()) { the_post_thumbnail( array(300,100));} ?> <br> <div id="2"> <h3><?php the_title(); ?></h3> <?php if(get_post_meta($post->ID, "desttitle_value", true) && has_post_thumbnail()) echo "<h2>".get_post_meta($post->ID, "desttitle_value", true)."</h2>"; ?> </div> <div id="destgo" > <a class="anchor1" href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>">?<!-- <img src="<?php echo CHILDTEMPLATEIMAGES.'/gothere.png'; ?>" alt="go there button" /> --></a> </div> </div>
What am I missing here?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Shot title and excerpt if has thumbnail’ is closed to new replies.