Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress

Wordpress Content Filtering

Can someone explain to me how to get started. I am trying to create a wordpress content filter that allows the viewer to select the posts they want to see from by pressing one of 6 buttons.

This is a great example: http://themeforest.net/item/blogmag-blogging-and-magazine-wordpress-theme/full_screen_preview/10936995

Click on one of the nav buttons (All, Business, Environment, Fancy, Food, Lifestyle) and the relevant posts are displayed. Those are probably categories or post types and it probably loads using AJAX.

I've done a good deal of googling but I am still confused as to how to start.

Can someone please point me in the right direction. Let me know if I am not being clear enough.

Thanks!!

1 Answer

Patrick Kelly
Patrick Kelly
6,200 Points

Hey Le'Herman,

Thanks for the link to what you're trying to achieve.

It would certainly seem like that section is using AJAX calls to retrieve the relevant data to show in the window.

I'm not sure of your level of coding ability so I wouldn't want to go too technical on you incase you don't understand what I'm saying, but to be able to make AJAX calls you will need to know jQuery and PHP fairly well as these two work together (most commonly) to make AJAX happen.

I noticed your profile on here doesn't have any points for JavaScript (which jQuery is a library of) or PHP, which is essential to be able to retrieve the relevant data you want to display.

You're certainly heading in the right direction by Googling for AJAX stuff! :) I'm not sure you've already come across the following resources, or if they'll be any use to you but just in case:

http://api.jquery.com/jquery.ajax/

Please let me know if I can be of any more help! :)

Best, Patrick

Thanks for the reply. Do you know of a wordpress plugin that might accomplish the same thing?