Title: How to put code in Loop
Last modified: August 31, 2016

---

# How to put code in Loop

 *  [catmaniax](https://wordpress.org/support/users/catmaniax/)
 * (@catmaniax)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/how-to-put-code-in-loop/)
 * Hello. Please help me because I keep looking and looking but can’t find a solution
   since I’m new to WordPress. I need to have a plugin’s code inside the theme’s
   loop but I don’t know where exactly I should place it.
    It’s a plugin for displaying
   featured images in posts. Until now I put manually the shortcode before each 
   post but I want it to be automated. The creator of the plugin says this code 
   must be placed inside Theme Loop:
 * <?php if ( function_exists(‘get_featured_img’) ) get_featured_img(); ?>
 * I hope you could help me!
    Thanks.

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

 *  [webdesignerchristian](https://wordpress.org/support/users/webdesignerchristian/)
 * (@webdesignerchristian)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/how-to-put-code-in-loop/#post-7250801)
 * try starting here
    [https://wordpress.org/support/topic/which-hook-should-i-use-to-insert-code-inside-the-loop-after-the_post?replies=4](https://wordpress.org/support/topic/which-hook-should-i-use-to-insert-code-inside-the-loop-after-the_post?replies=4)
 *  Thread Starter [catmaniax](https://wordpress.org/support/users/catmaniax/)
 * (@catmaniax)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/how-to-put-code-in-loop/#post-7250967)
 * I tried looking everywhere but that did not help me… 🙁
 * Any other suggestions?
 *  [webdesignerchristian](https://wordpress.org/support/users/webdesignerchristian/)
 * (@webdesignerchristian)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/how-to-put-code-in-loop/#post-7250970)
 * why do you need a plugin to display a post featured image?
    featured images are
   added to post when you create them.
 * [https://wordpress.org/support/topic/adding-featured-image-into-post-or-page?replies=4](https://wordpress.org/support/topic/adding-featured-image-into-post-or-page?replies=4)
 *  Thread Starter [catmaniax](https://wordpress.org/support/users/catmaniax/)
 * (@catmaniax)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/how-to-put-code-in-loop/#post-7250971)
 * Because the plugin helped me set it the way I want it, size, etc.
 *  [webdesignerchristian](https://wordpress.org/support/users/webdesignerchristian/)
 * (@webdesignerchristian)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/how-to-put-code-in-loop/#post-7250972)
 * so does settings > media? might have to rebuild thumbnails after adjustment

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

The topic ‘How to put code in Loop’ is closed to new replies.

## Tags

 * [loop](https://wordpress.org/support/topic-tag/loop/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 2 participants
 * Last reply from: [webdesignerchristian](https://wordpress.org/support/users/webdesignerchristian/)
 * Last activity: [10 years, 2 months ago](https://wordpress.org/support/topic/how-to-put-code-in-loop/#post-7250972)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
