Getting a feed from a WP site - php

I was wondering if anyone knows how we would go about pulling some kind of Wordpress feed to a html site? It's a syndicated process where the parent site will feed into multiple subdomains. We want to customize which categories and products are displayed on each subdomain. We could use MU wordpress with some sort of cron job plugin, but we were looking to try and make it more lightweight using an html site instead. Alternative to this could be Iframes, but we feed that that's a little limited.
Does anyone know how we'd do this? We want to be able to pull a feed from a wordpress site, and display on it on an html site.
Thanks

You can use WP REST API for this or could use RSS XML Feeds
I have done this using REST API and is a far easier and convenient solution that RSS XML Feeds

Related

Best way to share content between a Wordpress site and a Drupal site

I will try to be clear but if you need more information please do not hesitate.
A site approached me to make a partnership together. They want to create a new section on their site, say a "blog" section. The goal is to post my blog post on their site, in this new section, without having access to their admin.
So I need to set up something to be able to automatically share the content I post on my site with their site. My site is on Wordpress and their site is on Drupal.
For now I see 2 possibilities, but tell me what you think and if there is better to do.
First possibility: Create the page /blog and all the articles (ex: /blog/article-title) on my site, then set up a reverse proxy to redirect their request to my server. I have no experience with network setup so maybe I am completely wrong. But even if it works, I don't know how to fetch only post content (not header, footer) and change all urls.
Second possibility: Create a Drupal module, which they will have to install on their site, which creates the page /blog and the custom content type named "blog" when it is activated. And then use the feeds module to get the content from my wordpress feed and create a blog post for each post in the feed. With this solution, I won't have any header or footer problem, and the urls to the articles will be generated dynamically.
Every advice will be usefull. Thank you.
IMO, the easiest way to do that is to use the Wordpress REST API.
You could get all posts with this https://yoursite.com/wp-json/wp/v2/posts and get a specific post with https://yoursite.com/wp-json/wp/v2/posts/:id
full doc here : https://developer.wordpress.org/rest-api/reference/
I would advise you to use the second possibility, cause there are already several drupal moduls in the wild the read and import feeds from other sites.
Even more, WordPress will provide your posts also in oembed-format. With this you can use this Drupal Modul: https://www.drupal.org/project/soembed
You vcan adjust this modul to allow content from your website and display it on the Drupal installation.

how to pull posts from wordpress to other non-wordpress site on different hosting?

How can I pull the posts of one blogger(written on his wordpress blog) to my site without installing the wordpress on my site? What are requirements and limitations of doing that?
There are a couple ways to use wordpress as a CMS only, without actually using it as your site or to expose content for use on another site.
RSS feeds as noted in another answer is good for read-only access to posts. To interact with content you'll need another solution.
You can enable XML-RPC in wordpress and use a library like php xmlrpc to connect and pull post data. However, XML-RPC is limited out of the box and mostly geared towards publishing to wordpress, not pulling out stuff.
The most flexible solutions is a REST plugin for wordpress that expose your posts via restful API. Check out:
http://wordpress.org/extend/plugins/json-api/
One limitation is you'll obvioiusly not have some of the wordpress-as-a-website-building-tool plugin functionality available on the non-wordpress site.
If it's WordPress you could just use the RSS Feed to syndicate content to your site?
To grab the content you want - http://codex.wordpress.org/WordPress_Feeds
I believe that the plugin Wp RSS Multi importer should do the trick. It pulls out RSS feeds from the blog you want to syndicate into your own blog. You can get the plugin here http://wordpress.org/plugins/wp-rss-multi-importer/. The problem could be if what you want is not a feed. I for example want content that looks like this http://bake.co.ke/pg/recent+blog+posts. I don't want to syndicate feeds but the real content from another website.

Integrating Wordpress MU Blog into Web Site

I have a wordpress multisite network and it has 6 blogs who's posts I want to extract and put into 6 different pages on a separate website (this separate website is not wordpress based but it is php based). Its kind of like integrating wordpress blog into my own website but it does'nt seem to work for wordpress MU blogs. I spent all morning searching the web on how to do this but have come up with nothing. Anyone have any idea on how I can achieve this?
Thanks
Easiest way to do it is with the free FishPig extension for Magento.
http://www.magentocommerce.com/magento-connect/wordpress-integration.html
I use it on all of my sites and it's pretty easy.
You can get then get WordPress MU Integration from this extension:
http://fishpig.co.uk/wordpress-mu-integration.html
If you are extracting posts from each site, then using feed would be an obvious option to go. just post fix the /feed to each blog main url to get posts. In your own site, you will get posts in XML format, you then can parse it with php simpleXML.

Display posts of one wordpress site on another wordpress site

I want to access and display posts/categories/tags of my one wordpress site to another wordpress site. So how can I do this? Can some one tell me this?
You have to use RSS feed
http://codex.wordpress.org/WordPress_Feeds
You can parse RSS as an XML file using PHP
A RSS reader http://apptools.com/phptools/xml/rss.php
If you have set up wordpress multisite
then you can do it by using switch_to_blog() function.
Another option is to use data scraper plugin, through this you can display data of one page/post on another wordpress site all based on div id
http://wordpress.org/plugins/wp-web-scraper/

Can we use our own facebook application for wordpress feeds

Is there any way to share wordpress feed by our own FB application
for example now we use rss graffity and its posted by "via Rss Graffity"
Can we share our feeds on facebook "via FbStuff.in"
Is There any plugin or any way
Not used this plugin yet and not sure if it will work under the latest WordPress but i've heard of a few people using it. WordBook for WordPress. I'm sure theres a few other options.

Categories