Skip to content

Instantly share code, notes, and snippets.

@mannieschumpert
Created October 31, 2013 13:59
Show Gist options
  • Save mannieschumpert/7250269 to your computer and use it in GitHub Desktop.
Save mannieschumpert/7250269 to your computer and use it in GitHub Desktop.
When using ACF, and registering fields via PHP (and not using Lite mode), your fields might not show, the likely problem being that your registration code ran before the ACF plugin was initiated. To solve, wrap your fields registrations in a plugins_loaded hook.
<?php
add_action( 'plugins_loaded', 'register_my_fields' );
function register_my_fields(){
// put the exported PHP field registration code here
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment