Skip to content

Instantly share code, notes, and snippets.

@johnmccole
Created February 1, 2018 16:10
Show Gist options
  • Save johnmccole/c8787ae4d6d6cae9a5e28bcccc35f8cd to your computer and use it in GitHub Desktop.
Save johnmccole/c8787ae4d6d6cae9a5e28bcccc35f8cd to your computer and use it in GitHub Desktop.
When outputting content fields to a template, the field must be within a page or post loop. If a custom loop is added to a page, this loop must then end with wp_reset_query to continue the output of the custom fields/page content.
// loop code
<?php wp_reset_query(); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment