Very easy!

Just install the plugin JSON API in your WordPress ( to allow a REST API to export your blog posts). See more.

Captura de pantalla 2018-10-28 a las 11.35.29

Captura de pantalla 2018-10-28 a las 11.35.12

We can try the plugin doing a simple request by URL to your WordPress blog.

https://www.your_wordpress.com/api/get_recent_posts/

We will obtain a response in Json like this:

Captura de pantalla 2018-10-28 a las 11.32.02

We can format the response to see the attributes in Json:

Captura de pantalla 2018-10-28 a las 11.31.46

After this, using jQuery and javascript we can obtain the post from an external Website using simple code like this.

Captura de pantalla 2018-10-28 a las 11.32.54

 

Download the javascript example here

By MrAddon

(code adapted from this original source)

 

Advertisements
Posted by:.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s