最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How to use the WordPress API to get links and scripts in <head> and <body>

programmeradmin1浏览0评论

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.

发布评论

评论列表(0)

  1. 暂无评论