Support » Themes and Templates » How to add an icon/graphic to the end of each post content
6 years, 7 months ago
I’d like to add a little icon/graphic at the end of the text of every post.
I can add a icon/graphic below each post by amending single.php like so:
<?php the_content('<p class="serif">Read the rest of this entry »</p>'); ?>
<img src="<?php bloginfo('template_directory'); ?>/images/bf.gif" />
However, I want the graphic to be inline with the text within the post, not outside. For example, at present it looks like this:
…end of the post.
And I want it to be like this:
…end of the post. <graphic here>
Anyone know what I need to do to solve this?
this might work if used instead of your code:
<?php $text = get_the_content().' <img src="'.get_bloginfo('template_directory').'/images/bg.gif" />';
echo apply_filters('the_content',$text); ?>
You’re beautiful. Anyone ever tell you that? 😉 Worked a charm. Thanks.