the solution is already in your code – the way it is done to show the category icon:
<img src="<?php bloginfo('template_directory'); ?>/images/folder.gif" alt="<?php _e('Category', 'jfr_theme') ?>" /><?php the_category(', ') ?> |
do the same for the tag icon:
from this (could be distorted as you did not successfully use the backticks or code button to insert your code here)
<div class="tags"><?php the_tags(__('Tags: ', 'jfr_theme'), ' ', '
'); ?> </div>
to this:
<div class="tags"><img src="<?php bloginfo('template_directory'); ?>/images/tag.gif" alt="<?php _e('Tags', 'jfr_theme') ?>" /><?php the_tags('', ' ', '
'); ?> </div>
might need a bit of adjustment in style.css for
.tags img {...}
Thread Starter
notw
(@notw)
Alchymyth thanks very much it worked!
N
(@notw)
13 years, 8 months ago
Hi,
I would like to add an icon inside or under my post to be more exact. I am using the Jessica Fletcher Redux theme which has small icons in the postmetadata under each post. The tags are also displayed, but instead of an icon I have A text
Instead of this
Tags: Balenciaga Dior Gucci Jimmy Choo perfume Pink Shimmer
I would like a tag icon no text
I think I sort of know where the code should go, but really do not know what the code should be? This is the relevant section in the index.php The last line instead of Tags: (text) I would like to display an icon which I called tag.gif uploaded in the same directory as the other icons in this section below:
There are 3 icons
1 a folder icon for the categories called folder.gif
2 a pen icon for edit post called copy.gif
3 a comment cloud icons for leave a comment called comment.gif
I would like to add a tag icon for the tags as well called tag.gif
<p class=”postmetadata”><img src=”<?php bloginfo(‘template_directory’); ?>/images/folder.gif” alt=”<?php _e(‘Category’, ‘jfr_theme’) ?>” /><?php the_category(‘, ‘) ?> | <?php edit_post_link(__(‘ <img src=”‘.get_bloginfo(‘template_directory’).’/images/copy.gif” alt=”Edit” />Edit’, ‘jfr_theme’), ”, ‘ | ‘); ?> <img src=”<?php bloginfo(‘template_directory’); ?>/images/comment.gif” alt=”<?php _e(‘Comment’, ‘jfr_theme’) ?>” /><?php comments_popup_link(__(‘Leave a Comment »’, ‘jfr_theme’), __(‘1 Comment »’, ‘jfr_theme’), __(‘% Comments »’, ‘jfr_theme’)); ?></p><div class=”tags”><?php the_tags(__(‘Tags: ‘, ‘jfr_theme’), ‘ ‘, ‘
‘); ?> </div>
I think this is the right place to change but have no idea what the actual code should be to display an image instead of text, see above the very last line, sorry I cannot include images it would be so much easier to explain what I would like to do.
I would really appreciate your help, this is my last tweak and I am stuck!
Thanks,
N