How to get pages along with styles using REST API?
-
Here is the context of my problem:
I want to read the content of the pages created on wordpress and display in my website.
I am able to do that by making https://host-name/wordpress/wp-json/wp/v2/pages/page-id and read the content and display on my website using REST API.My problem:
I am not getting the styles of the pages. So the page looks really weird. I know that we get only the page’s content and styles are not included in it. I was wondering if there is a way create the pages in such a way that we get css and content together. (Don’t want to write complete HTML in page editor. User should be able to build page)
Is there a plugin or some thing that will use inline css?
If I can get all the css in a file, I can include that in my website. So I can get the page display well. Is there a way for it?As this is not straight forward, I am open for any ideas to implement it. Please share your thoughts.
I am looking for ideas on how to implement this and thought this is the right place to ask knowing this can not be done automatically.
Thanks,
Vinay
- The topic ‘How to get pages along with styles using REST API?’ is closed to new replies.