How can I count post views of REST API calls and update them in an ACF field?
I looked around again with a more relaxed mind and figured out that the_posts is the action hook I was looking for. This is how I just did it: add_action( ‘the_post’, function ( $post ) { $count = (int) get_field(‘views’); $count++; update_field(‘views’, $count); } ); Now I’ll just figure out how to sort it by … Read more