Support

Account

Home Forums Add-ons Repeater Field get_field occassionally returning string with repeater field Reply To: get_field occassionally returning string with repeater field

  • Hi John, ok thanks very much for that!

    Apologies for the much later reply, but I have found some of the code that you mentioned. In the file used for the thumbnails there is the following code;

      add_action( 'pre_get_posts', 'add_my_post_types_to_query' );
      function add_my_post_types_to_query( $query ) {
        $query->set( 'post_type', array( 'post', 'event' ) );
        return $query;
      }

    So now this is finally all making sense – this is the main problem here (whenever this file is being used and this code is executed, the repeater fields failed to load as described). And whenever this file is used, the thumbnails work and the repeat fields don’t. Thanks very much for helping me find this!

    Now can I ask if you have any idea on how to fix this? As I say I didn’t create this theme so I’m not sure on how it works, so your help would be very much appreciated!

    Thanks,
    Aidan