Tell me more ×
WordPress Answers is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Hy

how can i build a search filter someting like that ( ex: http://tvpedia.org/gen/actiune) with wordpress,

I have a custom post type name: Locatii, that custom post type have categories.

Ex: Cat 1 , Cat 2 ... and so on.

How can i implement ajax so when i pres Cat 1 ( checkbox) and Cat 2 i shoud retrive the post that are in that categories, without having a search button.

I search on internet , but no sucess... can you give me a example?

Thanks in advance.

share|improve this question

2 Answers

You'll need to hook into the "onchange" event of javascript. When using jquery, it's as simple as $('<the selector string>').change(function(){});

When ever the values are changed, you'll do an AJAX request to the server with the new parameters & populate the output screen with the new result. For the server-side, you'll check the parameters, do some validations & send the response after reading the data from the database.

This codex article will help http://codex.wordpress.org/AJAX_in_Plugins

share|improve this answer
Thanks for your answer, can you give me more details PHP code or a link ... I am not a great connoisseur of Ajax language. – Batman Nov 24 '12 at 21:18
Please go through the link provided in the answer & then add to the question some code that you've tried so far – Mridul Aggarwal Nov 24 '12 at 21:25
Ok, i will do that, i will come with an answer... thanks – Batman Feb 15 at 15:57

I'd suggest starting with the Query Multiple Taxonomies plugin. As far as I know it doesn't use AJAX, but you could try to extend it to add AJAX support.

share|improve this answer

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.