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

PHP

Help with a custom chained filter

Hi, lads.

I implemented some functionality in one of my clients sites trough a plugin (Category Ajax Chain Select). It's working ok, but I need to add it some more functionality to make it work in some other way.

This plugin helps me filtering results trough a select opction search in a custom taxonomy.

Here you have the live example filtering the custom taxonomy "categorías" in the custom post type "tiendas". And this is the piece of php I need to use to display it:

<?php chainselect_getcategories( 'categorias', 3, array('Selecciona un estado',     'Selecciona una ciudad', 'Selecciona una colonia'), array('Estado','Ciudad', 'Colonia'),     'Buscar', '') ?>

And here's a short explanation on how to use the plugin: http://www.peterjharrison.me/2011/11/category-ajax-chain-select-wordpress-plugin-2/

Now I need to add one specific ID of one more custom category (non hierarchical) called "productos" to add one more filter to the query to search in, besides the all ready selected options, the specific ID of the "tag" or custom non hierarchical category called "productos".

This is because my client wants to limited the search just to the stores with that product (Im using the "productos" custom non hierarchical category to groupe the stores with that product in commun)

I know I'll have to manually change the parameters of the php piece of code to match exactly what I want and exclude the id I don't want to query in... it's not a problem, just want it to function so can accept the custom non hierarchical category "productos" .

I just want some help to make it function and I'll do the boring work...

I figure it's not that hard, it's just that (even when I all ready solved all the available badges in the php paradise island) still don't got the knowledge to do it by myself

Any kind of help will be very useful

Thanks, mates

1 Answer

The page you linked to returns a 404 :/