WordPress.org

Ready to get started?Download WordPress

Forums

Need Plugin/Hack pull data to another domain (4 posts)

  1. sahdow
    Member
    Posted 6 years ago #

    I have a wordpress blog setup at domain 1 and I want to pull data from a specific catagory into domain 2. Both domains are on a cpanel server and memebres of the same reseller account. So they share a common path.

    I have found some scripts, but they don't function the way I want and I'm not a programmer. So here's my question:

    Can anyone provide me with a hack / plugin that will allow me to have post titles from a specific catagory displayed on another domain, and when clicked on (post title) will display the post data, but when clicking on next or another link will return visitor to the actual blog domain?

    I would like to find an exact solution, but any thoughts on variations of this would be helpful. For example, I could live with just displaying the post titles in a specific catagory. (Here is a sample of a site that does this - note not wordpress - http://edtachelation.com/articles.asp ).
    I just don't want an rss feed.

    Thanks in advance

  2. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

    I just don't want an rss feed.

    Well, then you're talking about some very custom coding work.

    If I was doing this, I would use the RSS feed approach myself. It's simple and easy by comparison to having the things directly connect to each others database. You have domain2 pull the category feed from domain1 every so often, and display the titles and content however you like. I mean, you can get RSS feeds of just specific categories out of WordPress, so that would be very easy to do.

  3. sahdow
    Member
    Posted 6 years ago #

    To Clairify domain 2 does not have a database.

    But any feedback on how to pull the feed into an external website would b helpful. would prefer to do it in php. Not a programmer, but can tweak code once I figure it out.

  4. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

    I like to use SimplePie for reading and parsing feeds in PHP code. It's pretty straightforward to use.

    This would be something you use on domain2. It would pull the feed from domain1 and let you display it.

    Note that you will want some kind of caching to save the feed for future use and only refresh it every so often. Fortunately, SimplePie has that built in if you use it properly.

    Might want to read some of these:
    http://simplepie.org/wiki/setup/start
    http://simplepie.org/wiki/setup/sample_page
    http://simplepie.org/wiki/reference/simplepie/set_cache_location
    http://simplepie.org/wiki/reference/start

    The second one has a very simple example of how to use it and will be the most instructive if you know a little PHP.

Topic Closed

This topic has been closed to new replies.

About this Topic