WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to make a portfolio page where each entry (a post) would be fetched using Ajax.

This way I would have an image gallery, but in which I not only would have images but also the description of the work, if it's for sale, the url to the shop, and whatever other random fields.

A gallery is not good enough because there is no clean way of displaying text belonging to each image's post.

share|improve this question
up vote 4 down vote accepted


There are a number of themes on the market that do load posts via AJAX. Take a look at any of them to get an idea of how they work. A particularly good example is K2 - K2 loads entire pages of posts via AJAX if you click on the previous posts link.

To really get your hands dirty, check out this awesome tutorial on loading posts via AJAX.

Just keep in mind, AJAX is all about using JavaScript to request data from a server - your server in this case is running WordPress and is built to produce posts based on specific requests. All you need to do is add the JavaScript layer to request them on demand.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.