Support

Account

Home Forums General Issues get_field not working in pre_get_posts Reply To: get_field not working in pre_get_posts

  • Your problem is here

    
    if ( (!is_admin() .....
    

    is_admin() always returns true for AJAX requests. You need to adjust this if statement to allow it to run during ajax.