?
Solved

Embed wordpress content into external site

Posted on 2018-02-07
4
High Priority
?
22 Views
Last Modified: 2018-02-08
I would like to embed wordpress posts list (filtered of course) into an external site using javascript (not iframes)
Is this possible - either a plug in or custom code?
0
Comment
Question by:roblickley
  • 2
4 Comments
 
LVL 5

Expert Comment

by:Brandon Dube
ID: 42461034
I have used https://feed43.com/ for this in the past. you can use any repeating region and create an RSS feed to your own site from it.
0
 

Author Comment

by:roblickley
ID: 42461196
Thanks but not quite what I am looking for I dont think.

In the past I have managed to incorporate wordpress posts in an asp site using some custom code I wrote - but this does rely on the wordpress being on the same domain and server as the destination. So main site in the root and wordpress in a /news/ directory.

In this instance I have my wordpress hosted on the blog. domain and the shopify site on the www. version. on separate servers thus.

Ideally I want some kind of javascript to pull article clips into product pages depending on metafields I assign to products.

anyone have an idea if this is even possible?
0
 
LVL 83

Accepted Solution

by:
leakim971 earned 3000 total points
ID: 42461694
anyone have an idea if this is even possible?

I did this many years ago using web service, you just need to call your web service from the shopify site using an URL like BUT using PHP backend cause Javascript don't allow cross domain ajax call until you allow it (https://developer.mozilla.org/fr/docs/HTTP/Headers/Access-Control-Allow-Origin)

the web services endpoint should look like :
http://blog.mydomain.com/wp-json/wp/v2/posts?filter[meta_key]=MY-KEY&filter[meta_value]=MY-VALUE
http://blog.mydomain.com/wp-json/wp/v2/posts/?filter[category_name]=uncategorized

more info here : http://v2.wp-api.org/
0
 

Author Closing Comment

by:roblickley
ID: 42462019
Thanks - that looks more like it - will investigate.
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The title says it all. Writing any type of PHP Application or API code that provides high throughput, while under a heavy load, seems to be an arcane art form (Black Magic). This article aims to provide some general guidelines for producing this typ…
The purpose of this video is to demonstrate how to exclude a particular blog category from the main blog page. This is can be used when a category already has its own tab, or you simply want certain types of posts not to show up on the main blog. …
The purpose of this video is to demonstrate how to prevent comment spam on a WordPress Website. This will be demonstrated using a Windows 8 PC. Plugin Akismet will be used. Go to your WordPress login page. This will look like the following: myw…
Suggested Courses

601 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question