Home Forums Add-ons Repeater Field Custom Post Type Generation Using ACF Repeater Fields ONLY Reply To: Custom Post Type Generation Using ACF Repeater Fields ONLY

  • I’ve done some A/B testing, and it looks as though none of the custom variables I’ve defined in my example code above are pulling through at all.

    For example, changing the output of the $cpt_slug variable to output a simple “post-type-name” string (instead of pulling through any ACF field data) results in the CPT not registering, but typing the exact same “post-type-name” string into the register_post_type action as shown below, does register the CPT (albeit without any of the custom labels I”m trying to get working):

    register_post_type( "post-type-name", $args );

    Additionally, the if / else statements defined for the $labels arrays aren’t working properly either.

    I know this because changing all of the $args lines to be written in their standard format without any variable or ACF field calls at all, results in the default else: variations pulling through instead.

    Note: None of the above information has solved my issue, but hopefully it will help clarify which parts of my code just aren’t working from the offset!