0

I created a custom post type portfolio and called apiFetch inside the edit() method of the block to try and get data from /wp-json/wp/v2/portfolio. However, I only get empty reply or unauthorized error.

In my anticipated outcome, the block should dynamically retrieve and display existing portfolio posts.

1
  • Please provide enough code so others can better understand or reproduce the problem. Commented May 30 at 9:25

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.