Skip to main content
added 16 characters in body; edited tags
Source Link
Johansson
  • 15.4k
  • 11
  • 43
  • 79

I have CPT transcript in wordpress website. And create 250 post in CPT transcript.

Now, I want to fetch all transcript data and want to store in another database using rest api url http://example.com/wp-json/wp/v2/transcript/

AND

HTTP request using CURL

$ch = curl_init();

$url = 'http://example.com/wp-json/wp/v2/transcript/';

curl_setopt($ch, CURLOPT_URL, $url);

curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

curl_setopt($ch, CURLOPT_HEADER, 1);

return curl_exec($ch);

curl_close($ch);

$ch = curl_init();
$url = 'http://example.com/wp-json/wp/v2/transcript/'; 
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 1);
return curl_exec($ch);
curl_close($ch);

But this return only 10 transcript,

Please help me, how to retrieve all transcript post data.

I have CPT transcript in wordpress website. And create 250 post in CPT transcript.

Now, I want to fetch all transcript data and want to store in another database using rest api url http://example.com/wp-json/wp/v2/transcript/

AND

HTTP request using CURL

$ch = curl_init();

$url = 'http://example.com/wp-json/wp/v2/transcript/';

curl_setopt($ch, CURLOPT_URL, $url);

curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

curl_setopt($ch, CURLOPT_HEADER, 1);

return curl_exec($ch);

curl_close($ch);

But this return only 10 transcript,

Please help me, how to retrieve all transcript post data.

I have CPT transcript in wordpress website. And create 250 post in CPT transcript.

Now, I want to fetch all transcript data and want to store in another database using rest api url http://example.com/wp-json/wp/v2/transcript/

AND

HTTP request using CURL

$ch = curl_init();
$url = 'http://example.com/wp-json/wp/v2/transcript/'; 
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 1);
return curl_exec($ch);
curl_close($ch);

But this return only 10 transcript,

Please help me, how to retrieve all transcript post data.

Source Link
K. Pro
  • 1
  • 1
  • 1

How to get all post of custom post type by rest api?

I have CPT transcript in wordpress website. And create 250 post in CPT transcript.

Now, I want to fetch all transcript data and want to store in another database using rest api url http://example.com/wp-json/wp/v2/transcript/

AND

HTTP request using CURL

$ch = curl_init();

$url = 'http://example.com/wp-json/wp/v2/transcript/';

curl_setopt($ch, CURLOPT_URL, $url);

curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

curl_setopt($ch, CURLOPT_HEADER, 1);

return curl_exec($ch);

curl_close($ch);

But this return only 10 transcript,

Please help me, how to retrieve all transcript post data.