Or shall i just create a new group with nothing but the counter field and add it to a random empty page?
Or maybe use WP built in custom fields? I tried that first but it didn’t save the new field either. I’m so confused.
ACF cannot save values to fields that have not been created in a group. ACF also cannot get values from the field. To use fields that do not exist in an ACF field your you need to use standard WP function like add_post_meta(), update_post_meta(), get_post_meta().
Alright. Got it. Now I know not to try it.
I’ll use wp functions.
I investigated the reason of those not working. I can’t just use those wp functions on an Ajax called plugin. I must create a function and call admin-ajax.php in the js, also there must be an action with the name of the function that needs to run. I’ll try when I get the time I hope it works!