Advanced Custom Fields
[resolved] Doesn't Work with Page Template (4 posts)

  1. rgoins
    Posted 4 years ago #

    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.


  2. rgoins
    Posted 4 years ago #

    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 } ?>
  3. simco
    Posted 3 years ago #

    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.

  4. jrichardsMav
    Posted 3 years ago #

    put this after you close the if

    <?php wp_reset_query(); // reset the query ?>

    That should fix it

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Advanced Custom Fields
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic