• Resolved picklerpackage

    (@picklerpackage)


    ACF field values arent shown (repeater field data in this case). It just shows “1”.

    Custom field data is shown.

    My developer tells me function get_field from ACF is not working. This just happens in custom post types.

    It has to do with the init order of CPT. Can this be changed, so that ACF fields are loaded before CPT UI?

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    hmm. All of the post types registered with CPTUI get registered on default 10 priority, however that may also still be ahead of other things loaded on priority 10, like something from a theme, since plugin code gets read first.

    I wonder if the “1” return value is perhaps being considered “return true” for some reason.

    Our callback that fetches everything and runs the register_post_type() calls can be seen at https://github.com/WebDevStudios/custom-post-type-ui/blob/1.12.1/custom-post-type-ui.php#L325-L327

    I believe from a theme, you could add this, if needed:

    remove_action( 'init', 'cptui_create_custom_post_types', 10 );
    add_action( 'init', 'cptui_create_custom_post_types', 11 );
    

    This will unhook our original placement, and then re-hook the exact same code, but on priority 11 which is lower in this case. Priority 1 is super high priority for example, while 100 would be super low.

Viewing 1 replies (of 1 total)
  • The topic ‘ACF field values not showing’ is closed to new replies.