hising / wp-json

WordPress plugin for syndicating feeds using JSON.

This URL has Read+Write access

wp-json / README.markdown
fa7343fa » hising 2008-12-19 Updated Markdown 1 # WP-JSON
2 * Contributors: hising
3 * Tags: json, feed
4 * Requires at least: 2.5
5 * Tested up to: 2.7
6
7 ## Introduction
e9b3c471 » hising 2008-12-19 Changed file extension 8
9 WP-JSON Lets you easily syndicate your feed as JSON enabling easy third party JavaScript integration.
10
fa7343fa » hising 2008-12-19 Updated Markdown 11 ## Description
e9b3c471 » hising 2008-12-19 Changed file extension 12
13 WP-JSON is a plugin that easily enables you start syndicating your blog entries using JSON. This enables third party integration with JavaScript solutions cross domain without use of proxy. Supports JSON-callback parameter. Inspired by this [blog post](http://blog.julienviet.com/2008/08/14/json-support-for-wordpress/) but now bundled as a plugin and with support for PHP installations lower than 5.2.0
14
fa7343fa » hising 2008-12-19 Updated Markdown 15 ## Installation
e9b3c471 » hising 2008-12-19 Changed file extension 16 1. Upload the wp-json folder to your plugin directory
17 2. Activate the WP-JSON plugin in the plugin section of your blog admin interface
6ab7d5b6 » hising 2008-12-19 Updated Markdown 18 3. Test that your blog responds correctly:
19 * With mod_rewrite enabled: http://yourblog.com/feed/json/?callback=method
20 * With mod_rewrite disabled: http://yourblog.com/?feed=json&callback=method
e9b3c471 » hising 2008-12-19 Changed file extension 21
fa7343fa » hising 2008-12-19 Updated Markdown 22 ## Frequently Asked Questions
e9b3c471 » hising 2008-12-19 Changed file extension 23
fa7343fa » hising 2008-12-19 Updated Markdown 24 ### How do I grab the JSON Feed?
e9b3c471 » hising 2008-12-19 Changed file extension 25
6ab7d5b6 » hising 2008-12-19 Updated Markdown 26 * Use http://yourblog.com/[path/]feed/json/?callback=method
27 * If you do not have mod_rewrite enabled: http://yourblog.com/[path/]?feed=json&callback=method
e9b3c471 » hising 2008-12-19 Changed file extension 28
fa7343fa » hising 2008-12-19 Updated Markdown 29 ### Where can I find an example of this in use?
e9b3c471 » hising 2008-12-19 Changed file extension 30
6ab7d5b6 » hising 2008-12-19 Updated Markdown 31 Try [http://frontendbook.com/feed/json/?callback=method](http://frontendbook.com/feed/json/?callback=method) and you should see our feed syndicated in JSON.
32
33 $(function(){
34 $("body").append('<div id="wp-json">Loading JSON</div>');
35 $("#wp-json").css({
36 'position' : 'fixed',
37 'right' : '0px',
38 'top' : '0px',
39 'background' : '#f00'
40 });
41 $.getJSON('http://frontendbook.com/feed/json/?callback=?', function(json){
42 var result = '<ul>';
43 $.each(json.items, function(){
44 result += '<li><a href="' + this.link + '">' + this.title + '</a></li>';})
45 result += '</ul>';
46 $("#wp-json").css({
47 'background' : '#fff'
48 }).html(result);
49 });
50 });
e9b3c471 » hising 2008-12-19 Changed file extension 51
fa7343fa » hising 2008-12-19 Updated Markdown 52 ### Can you recommend any good JavaScript library for reading JSON?
6ab7d5b6 » hising 2008-12-19 Updated Markdown 53 Yes, I can, I prefer using the [jQuery JavaScript Library](http://jquery.com)