Title: template=&#039;loop.php&#039; not working
Last modified: August 20, 2016

---

# template='loop.php' not working

 *  Resolved [senthilmaster](https://wordpress.org/support/users/senthilmaster/)
 * (@senthilmaster)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/templateloopphp-not-working/)
 * Hello!
    Thanks for this great plugin, which should be doing what I want, however
   when I add template=’loop.php’ in the shortcode (to style the posts from the 
   designated categroy as my general posts – I’m using TwentyTen) the page content
   takes time to load and is finally empty, so is the sidebar… I also tried saving
   loop.php with another name but it didn’t work.
 * Here’s the website : [http://www.axoscience.com](http://www.axoscience.com)
    
   The general posts page comes in the R&D PROJECTS menu (which displays all the
   posts under the parent category ‘projects’) and I wand to use your plugin in 
   COMPANY/NEWS (www.axoscience.com/company/news/), which is a child-page of ‘company’
   and displays all the posts from the category ‘news’. [ic_add_posts category=’
   news’] wokrs fine but I would like to style the posts in the same way as R&D 
   PROJECTS, and when I try [ic_add_posts category=’news’ template=’loop.php’] the
   page and sidebar becomes empty…
 * Is there something I’m doing wrong?
 * [http://wordpress.org/extend/plugins/posts-in-page/](http://wordpress.org/extend/plugins/posts-in-page/)

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

 *  Plugin Author [Eric Amundson](https://wordpress.org/support/users/sewmyheadon/)
 * (@sewmyheadon)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/templateloopphp-not-working/#post-3327464)
 * Hey Senthilmaster,
 * Thanks for the post.
 * I’m not sure what’s going on offhand, and will have to do some testing, but am
   wondering if you tried copying the `posts_loop_template.php` to your theme directory
   and making the necessary changes there?
 * If you do that, you can tailor the output using that template and then you won’t
   have to specify the template name.
 * I’ll do some testing here and see if I can replicate your issue and report back.
 * Eric
 *  Thread Starter [senthilmaster](https://wordpress.org/support/users/senthilmaster/)
 * (@senthilmaster)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/templateloopphp-not-working/#post-3327466)
 * Thanks so much for you swift answer!
 * Yes I did copy loop.php (in TwentyTen it is just called loop) and tweaked it 
   so that my posts are displayed as I want in [http://www.axoscience.com/category/projects/anr/](http://www.axoscience.com/category/projects/anr/),
   and I would like the posts displayed in my news page ([http://www.axoscience.com/company/news/](http://www.axoscience.com/company/news/))
   using your plugin’s shortcode to actually look exactly the same, which is not
   the case when I only use [ic_add_posts category=’news’], that’s why I tried adding
   template=’loop.php’…
 * Thanks for letting me know if you find what’s wrong.
 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/templateloopphp-not-working/#post-3327467)
 * the problem is likely that in Twenty Ten, _**loop.php **_actually contains the
   loop, and is not just an output template like _**content.php **_in Twenty Eleven.
 *  Plugin Author [Eric Amundson](https://wordpress.org/support/users/sewmyheadon/)
 * (@sewmyheadon)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/templateloopphp-not-working/#post-3327470)
 * senthilmaster,
 * You replied before I’ve done any testing, but pardon me; I’m still a bit confused.
   Here’s my question more directly:
 * Did you copy the `posts_loop_template.php` from `wp-content/plugins` to your 
   theme directory and then copy in the loop information from from TwentyTen’s loop?
 * Or, did you just copy the existing loop file and try to point to it using the`
   template=` attribute?
 * If you haven’t already, try the former.
 * Eric
 *  Plugin Author [Eric Amundson](https://wordpress.org/support/users/sewmyheadon/)
 * (@sewmyheadon)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/templateloopphp-not-working/#post-3327475)
 * > the problem is likely that in Twenty Ten, loop.php actually contains the loop,
   > and is not just an output template like content.php in Twenty Eleven.
 * Exactly right!
 * So, senthilmaster, the issue is that loop.php in the Twenty Ten theme contains
   a loop, but the `posts_loop_template.php` file is only an output template and
   it doesn’t contain a loop. The loop for the plugin is handled elsewhere.
 * My recommendation: copy the `posts_loop_template.php` from `wp-content/plugins`
   to your theme directory and tailor as you see fit.
 *  Thread Starter [senthilmaster](https://wordpress.org/support/users/senthilmaster/)
 * (@senthilmaster)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/templateloopphp-not-working/#post-3327486)
 * Allright I get it now! My confusion came indeed from thinking `posts_loop_template.
   php` was the THEME’s loop, but it is actually the PLUGIN’s loop…
    Sorry I’m really
   not good with coding and all these technical things 🙂
 * So yes now it is working!
    I should manage tweaking this file to my needs…
 * Thank you so much for your help, both of you.
 *  Plugin Author [Eric Amundson](https://wordpress.org/support/users/sewmyheadon/)
 * (@sewmyheadon)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/templateloopphp-not-working/#post-3327644)
 * You’re quite welcome; glad you got it working.
 * Have a great weekend!
 * Eric

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

The topic ‘template='loop.php' not working’ is closed to new replies.

 * ![](https://ps.w.org/posts-in-page/assets/icon-256x256.png?rev=1596190)
 * [Posts in Page](https://wordpress.org/plugins/posts-in-page/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/posts-in-page/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/posts-in-page/)
 * [Active Topics](https://wordpress.org/support/plugin/posts-in-page/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/posts-in-page/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/posts-in-page/reviews/)

## Tags

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

 * 7 replies
 * 3 participants
 * Last reply from: [Eric Amundson](https://wordpress.org/support/users/sewmyheadon/)
 * Last activity: [13 years, 5 months ago](https://wordpress.org/support/topic/templateloopphp-not-working/#post-3327644)
 * Status: resolved