Title: [Plugin: Advanced Custom Fields] Doesn&#039;t Work with Page Template
Last modified: August 20, 2016

---

# [Plugin: Advanced Custom Fields] Doesn't Work with Page Template

 *  Resolved [rgoins](https://wordpress.org/support/users/rgoins/)
 * (@rgoins)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-advanced-custom-fields-doesnt-work-with-page-template/)
 * I can’t get get_field or the_field to work on any page that has custom page template
   associated with it. For example, with my theme my home page and blog page use
   custom templates. If I change these pages to use the default template then the
   codes work fine but when I use a page template the codes quit working. How can
   I fix this?
 * The site is [http://pr-you.com](http://pr-you.com).
 * [http://wordpress.org/extend/plugins/advanced-custom-fields/](http://wordpress.org/extend/plugins/advanced-custom-fields/)

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

 *  Thread Starter [rgoins](https://wordpress.org/support/users/rgoins/)
 * (@rgoins)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-advanced-custom-fields-doesnt-work-with-page-template/#post-2997084)
 * I found the code messing it up but I don’t know why.
 *     ```
       <?php if ( !is_archive() ) { ?>
       <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts('paged='.$paged.'&cat='.$cat); ?>
       <?php } ?>
       ```
   
 *  [simco](https://wordpress.org/support/users/simco/)
 * (@simco)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-advanced-custom-fields-doesnt-work-with-page-template/#post-2997143)
 * I’m having a similar related issue. Do you have Chrome and the developer tools
   plugin? If so, pull up the javascript console and tell me what the error message
   is when you encounter that problem.
 * My issue is the admin area is broken due to a conflict somewhere with the ACF
   plugin and the error returned is specific to the page_template action. I’m curious
   what yours says.
 *  [jrichardsMav](https://wordpress.org/support/users/jrichardsmav/)
 * (@jrichardsmav)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-advanced-custom-fields-doesnt-work-with-page-template/#post-2997240)
 * put this after you close the if
 * <?php wp_reset_query(); // reset the query ?>
 * That should fix it

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

The topic ‘[Plugin: Advanced Custom Fields] Doesn't Work with Page Template’ is 
closed to new replies.

 * ![](https://ps.w.org/advanced-custom-fields/assets/icon.svg?rev=3207824)
 * [Advanced Custom Fields (ACF®)](https://wordpress.org/plugins/advanced-custom-fields/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/advanced-custom-fields/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/advanced-custom-fields/)
 * [Active Topics](https://wordpress.org/support/plugin/advanced-custom-fields/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/advanced-custom-fields/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/advanced-custom-fields/reviews/)

## Tags

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

 * 3 replies
 * 3 participants
 * Last reply from: [jrichardsMav](https://wordpress.org/support/users/jrichardsmav/)
 * Last activity: [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-advanced-custom-fields-doesnt-work-with-page-template/#post-2997240)
 * Status: resolved