Download html file post content

Question

I want to do this on my website :

  • add a button on edit.php page (I succeeded)
  • when I click on this button, I want to get the html’s post and download it as html file

I know how to get the html content from the WP REST API with ‘wp-json/v2/posts?include[]=POSTID’ and my content is in result->content->rendered

But how to download an html file with the content from result->content->rendered please ?
i have no idea how to do

Thanks

0
user7734861 8 months 2020-11-25T09:10:36-05:00 0 Answers 9 views 0

Leave an answer

Browse
Browse