Skip navigation
Tyssen Design — Brisbane Freelance Web Developer
(07) 3300 3303

Wordpress Articles

Fetching posts in Wordpress and ExpressionEngine with jQuery and AJAX

By John Faulds /

Recently I was asked by a client to do some customisation of a Wordpress site to enable a site visitor to load posts from a certain category into the same part of the page via AJAX. This could have been done in a couple of different ways – using AJAX as requested; or all the posts could've been printed to the page, with javascript then used to hide all but one and also used to navigate between them in some sort of hide/show, fading/sliding effect. I've done similar things like this before using jQuery, but there were two reasons why I didn't go that route on this occasion:

  1. With javascript turned off, all the posts from the selected category would've been displayed on the page and as the design called for three short columns of text on the page, having one column much, much longer than the other two would really have looked wrong.
  2. The client specifically asked for AJAX to be used.