php newbie – need help with a sticky featured image border/link
-
So I edited the stylesheet for this theme called designpile. It has a function where you can have a featured post with a big splashy image on the top. However, if I want to make a post there without an image it gives me alt text with a link and a border which just looks icky.
Long story short, I want to edit the code so that if there is a featured image specified it will show up as it does now. If there is no featured image specified it will just give you the text excerpt and nothing else.
Here is the code I tracked down where I think this is happening and I’m not sure how to edit it. Any ideas? Also, this is the site https://www.tednaifeh.com
<div class=”featuredDetails”>
<?php $featured_img = get_post_meta($post->ID, ‘featured_img’, $single = true); ?>
“><img src=”<?php echo $featured_img ?>” border=”0″; alt=”<?php the_title()?>”/>
<?php the_excerpt()?>
</div>
- The topic ‘php newbie – need help with a sticky featured image border/link’ is closed to new replies.