admin管理员组

文章数量:1023213

I'm using the WordPress API as a headless CMS. I have Elementor plugin installed to do page building in the WordPress admin.

I'm trying to figure out how to get all of the <link> and <script> tags that Elementor requires via the WordPress API. The API right now for /pages only gives me the rendered HTML from the_content().

Is there a way to extend WordPress API /pages to either:

  • Return the <head> links and scripts and any <body> links and scripts?
  • Return the full HTML for a page, from <html> to </html>?

My backup solution is to use a screen scraping tool to get the full HTML, but I'd rather avoid doing that.

I'm using the WordPress API as a headless CMS. I have Elementor plugin installed to do page building in the WordPress admin.

I'm trying to figure out how to get all of the <link> and <script> tags that Elementor requires via the WordPress API. The API right now for /pages only gives me the rendered HTML from the_content().

Is there a way to extend WordPress API /pages to either:

  • Return the <head> links and scripts and any <body> links and scripts?
  • Return the full HTML for a page, from <html> to </html>?

My backup solution is to use a screen scraping tool to get the full HTML, but I'd rather avoid doing that.

本文标签: How to use the WordPress API to get links and scripts in ltheadgt and ltbodygt