acf-to-rest-api icon indicating copy to clipboard operation
acf-to-rest-api copied to clipboard

X-WP-Total & X-WP-TotalPages are missing on headers

Open buroli opened this issue 6 years ago • 4 comments

Hi,

It seems that these headers X-WP-Total & X-WP-TotalPages (available with post type) isn't available on acf. Any solution to recover them ?

Thanks.

buroli avatar Jan 25 '19 18:01 buroli

In my case I was able to use the wp-json/wp/v2 endpoints rather than the wp-json/acf/v3 endpoints and that gave me the headers.

dottodot avatar Apr 25 '19 08:04 dottodot

Same problem here, but changing from v3 to v2 didn't work...

danielbenjamins avatar Jul 09 '19 02:07 danielbenjamins

Hi, I had same problem. It doesnt have X-WP-Total & X-WP-TotalPages headers values, but you are not limited to 100 posts per request. But i think you still need to do pagination manually. /wp-json/acf/v3/posts/?per_page=111 will give you 111.

kamilduleba avatar Apr 15 '20 10:04 kamilduleba

Hello please take a look at my pull request #358

I've made fixes about this issue and the issue with not handled errors

gtsvetanov avatar Oct 29 '20 15:10 gtsvetanov