Skip to content
Advertisement

Tag: wordpress-rest-api

Headers already sent error with get_template_part in REST API call

I’ve looked at multiple other questions about this warning (Headers already sent…etc) and this thorough explanation, but I’m not finding a solution for the circumstances I’m dealing with: I have a custom Wordpress REST API endpoint that returns the output of get_template_part. When I just call get_template_part normally on a page, there’s no warning. It only appears when it runs

Alternative to wp_update_post() in WordPress REST API

I’m a beginner and I’m trying to write a Wordpress Plugin in PHP to auto-update content on multiple pages. I managed to make it work, it updates correctly, however it breaks multiple page options (controlled by the theme). I believe it’s caused by the wp_update_post() function. I’m looking for the REST API equivalent of this, since it works successfully when

Advertisement