Archive for the ‘ajax’ tag
The first successful customization of a technology was adding WordPress blog entries to the athile technologies home page. How was this done? Remarkably simply:
Part 1: Get it working
- Read this blog post on how to include WordPress snippets on another page
- Added a simple PHP page to return only the WordPress snippets
- Test it in isolate to serve it’s own full page of snippets
- Strip out the HTML and BODY tags from the PHP generation. Add a JQuery AJAX call to the PHP to insert the WordPress snippets into a “blog_entries” div on the home page.
Part 2: Customize it
- Visit the WordPress Codex for APIs to get exactly the content that is desired
- Realize that the_content_rss is deprecated, that the_content doesn’t allow excerpts, and that the_excerpt’s default behavior strips all formatting, so visit Aaron Russell’s blog post that describes how to override the_excerpt’s behavior.
- Add a custom Ajax loading image from here.
There’s still plenty of room for improving the formatting, but all-in-all, adding a couple blog entries to the front page was remarkably simple.