Blog Posts on the Home Page

without comments

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

  1. Read this blog post on how to include WordPress snippets on another page
  2. Added a simple PHP page to return only the WordPress snippets
  3. Test it in isolate to serve it’s own full page of snippets
  4. 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

  1. Visit the WordPress Codex for APIs to get exactly the content that is desired
  2. 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.
  3. 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.

Written by arthur

July 13th, 2010 at 8:50 am

Posted in company

Tagged with , ,

 

Leave a Reply