Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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
add comment

1 Answer

up vote 4 down vote accepted

Absolutely!

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
add comment

Your Answer

 
discard

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.