Title: Icon on Posts
Last modified: August 18, 2016

---

# Icon on Posts

 *  [dturnbull](https://wordpress.org/support/users/dturnbull/)
 * (@dturnbull)
 * [20 years, 3 months ago](https://wordpress.org/support/topic/icon-on-posts/)
 * Is it possible to allocate an icon to a post and display it next to the title?
   
   I found post icon plugins for 1.5, but i use 2.0

Viewing 8 replies - 1 through 8 (of 8 total)

 *  Thread Starter [dturnbull](https://wordpress.org/support/users/dturnbull/)
 * (@dturnbull)
 * [20 years, 3 months ago](https://wordpress.org/support/topic/icon-on-posts/#post-345759)
 * anyone? 🙁
 *  [niziol](https://wordpress.org/support/users/niziol/)
 * (@niziol)
 * [20 years, 3 months ago](https://wordpress.org/support/topic/icon-on-posts/#post-345761)
 * I’m not exactly sure what you mean, like a different icon beside every post title
   or the same icon next to every post title?
 * Cheers,
    Michael.
 *  [moloko](https://wordpress.org/support/users/moloko/)
 * (@moloko)
 * [20 years, 3 months ago](https://wordpress.org/support/topic/icon-on-posts/#post-345776)
 * I think he is looking to have an icon for each catagory and show up next to the
   title of his post.
 *  [viper007bond](https://wordpress.org/support/users/viper007bond/)
 * (@viper007bond)
 * [20 years, 3 months ago](https://wordpress.org/support/topic/icon-on-posts/#post-345779)
 * [http://codex.wordpress.org/Template_Tags/get_the_category#Show_Category_Images](http://codex.wordpress.org/Template_Tags/get_the_category#Show_Category_Images)
 *  Thread Starter [dturnbull](https://wordpress.org/support/users/dturnbull/)
 * (@dturnbull)
 * [20 years, 3 months ago](https://wordpress.org/support/topic/icon-on-posts/#post-345797)
 * i want to be able to show a different icon for each post.
 *  [viper007bond](https://wordpress.org/support/users/viper007bond/)
 * (@viper007bond)
 * [20 years, 3 months ago](https://wordpress.org/support/topic/icon-on-posts/#post-345804)
 * Manually? Then you’ll probably want to use the custom fields.
 * [http://codex.wordpress.org/Using_Custom_Fields](http://codex.wordpress.org/Using_Custom_Fields)
 *  [auxillary](https://wordpress.org/support/users/auxillary/)
 * (@auxillary)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/icon-on-posts/#post-345877)
 * I tried the thingy at [http://codex.wordpress.org/Template_Tags/get_the_category#Show_Category_Images](http://codex.wordpress.org/Template_Tags/get_the_category#Show_Category_Images)
 * I put the following code in my index.php file in front of <?php the_title(); ?
   > … but nothing happened:
    <?php foreach((get_the_category()) as $cat) { echo‘
   <img src=”[http://example.com/images/&#8217](http://example.com/images/&#8217);.
   $cat->cat_ID . ‘.jpg” alt=”‘ . $cat->cat_name . ‘” />’; } ?>
 * The image is exactly named like the category.
 * Any additional explanation on how to use the code on the page mentioned above!?
   Please?
 * Eric
 * Edit:
    DUH!!!! Ok found the flaw in my try! Picture name should be the number
   of the category (ID) not the name! It works!
 *  [auxillary](https://wordpress.org/support/users/auxillary/)
 * (@auxillary)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/icon-on-posts/#post-345882)
 * I got it to work on my categories but is there a way similar to the above to 
   get icons/images in my PAGE titles as well. I did experiment a bit with it but
   no results yet.
 * Is there a way to get the page_id … instead of the cat_id like in the code above?
 * TIA,
 * Eric

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Icon on Posts’ is closed to new replies.

 * 8 replies
 * 5 participants
 * Last reply from: [auxillary](https://wordpress.org/support/users/auxillary/)
 * Last activity: [20 years, 2 months ago](https://wordpress.org/support/topic/icon-on-posts/#post-345882)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
