Title: Template Function Not Loading
Last modified: August 22, 2016

---

# Template Function Not Loading

 *  [designsbybrandon](https://wordpress.org/support/users/designsbybrandon/)
 * (@designsbybrandon)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/template-function-not-loading/)
 * I have installed this plugin and chose to use the Template Function to replace
   the existing Marketpress image (since this plugin just displayed the gallery 
   below the default image).
 * To use the Template Function I followed steps at [http://premium.wpmudev.org/blog/the-easy-guide-to-theming-marketpress/](http://premium.wpmudev.org/blog/the-easy-guide-to-theming-marketpress/)
   to create the template.
    1. Duplicated page.php and renamed to mp_product.php
   and changed the template part to product. 2. Duplicated content-page.php and 
   renamed to content-product.php and replaced the_content() with a basic Market
   Press Loop. 3. Change mp_product_image() to mp_template_gallery().
 * Now when I load my product page, I do not get an image at all. No default image
   or gallery plugin. Any idea what might be causing the mp_template_gallery() to
   not render?
 * [https://wordpress.org/plugins/marketpress-product-gallery/](https://wordpress.org/plugins/marketpress-product-gallery/)

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

 *  [Predrag – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support1/)
 * (@wpmudev-support1)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/template-function-not-loading/#post-5591247)
 * Hi [@designsbybrandon](https://wordpress.org/support/users/designsbybrandon/),
 * I hope you are well today and thank you for your question.
 * Could you please share me the code from your template files mp_product.php and
   content-product.php so that i can troubleshoot it?
 * To share the code you can copy paste your code in [pastebin](http://pastebin.com/)
   and share its unique code here.
 * Kind Regards,
    Vinod Dalvi
 *  Thread Starter [designsbybrandon](https://wordpress.org/support/users/designsbybrandon/)
 * (@designsbybrandon)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/template-function-not-loading/#post-5591273)
 * Thanks Vinod! Here are the pastebins.
 * mp_product.php – [http://pastebin.com/RuWtdCX6](http://pastebin.com/RuWtdCX6)
   
   content-product.php – [http://pastebin.com/frSNBpzp](http://pastebin.com/frSNBpzp)
 *  [Predrag – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support1/)
 * (@wpmudev-support1)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/template-function-not-loading/#post-5591283)
 * Hi [@designsbybrandon](https://wordpress.org/support/users/designsbybrandon/),
 * Thank you for sharing the code.
 * Could you please try using mp_template_gallery(get_the_ID()) instead of just 
   mp_template_gallery()
 * Best Regards,
    Vinod Dalvi
 *  Thread Starter [designsbybrandon](https://wordpress.org/support/users/designsbybrandon/)
 * (@designsbybrandon)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/template-function-not-loading/#post-5591295)
 * Vinod;
 * Thanks, but that doesn’t seem to work either. When I view source on my pages 
   with this plugin installed, I do not see anything in the code where it would 
   be attempting to write the image gallery. The entry-content div class goes straight
   to the product description where on the other pages there is an hmedia div with
   the image.
 *  [glenlau](https://wordpress.org/support/users/glenlau/)
 * (@glenlau)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/template-function-not-loading/#post-5591336)
 * Hello, this plug-in is required to use with other plug-ins, after I installed
   the plug did not find a place to upload product images. See your product shots
   still need “MarketPress Product Gallery” This plugin does, but I can not find
   this plugin.
 *  [glenlau](https://wordpress.org/support/users/glenlau/)
 * (@glenlau)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/template-function-not-loading/#post-5591337)
 * Warning: array_filter() expects parameter 1 to be array, null given in D:\web\
   www\htdocs\wp\wp-content\plugins\marketpress-product-gallery\mp-image-gallery.
   php on line 187
 *  [Dimitris – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support6/)
 * (@wpmudev-support6)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/template-function-not-loading/#post-5591338)
 * Hey designsbybrandon,
 * Sorry for the huge delay here!
 * It seems the pastebins have expired.
    If you still having problem with this can
   you post the code you are using again?
 * Sorry again for the inconvenience,
    Ivan
 * [@glenlau](https://wordpress.org/support/users/glenlau/) Can you please start
   your own thread as per [forum rules](https://wordpress.org/support/topic/template-function-not-loading/codex.wordpress.org/Forum_Welcome?output_format=md#Where_To_Post)
   
   If it is separate we will be able to track your problem easier.

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

The topic ‘Template Function Not Loading’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/marketpress-product-gallery_f5f5f6.
   svg)
 * [MarketPress Product Image Gallery](https://wordpress.org/plugins/marketpress-product-gallery/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/marketpress-product-gallery/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/marketpress-product-gallery/)
 * [Active Topics](https://wordpress.org/support/plugin/marketpress-product-gallery/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/marketpress-product-gallery/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/marketpress-product-gallery/reviews/)

 * 7 replies
 * 4 participants
 * Last reply from: [Dimitris – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support6/)
 * Last activity: [11 years, 3 months ago](https://wordpress.org/support/topic/template-function-not-loading/#post-5591338)
 * Status: not resolved