Title: Parent only filter
Last modified: August 24, 2016

---

# Parent only filter

 *  Resolved [Rubas](https://wordpress.org/support/users/rubas/)
 * (@rubas)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/parent-only-filter/)
 * Hi Dima and BeRocket.
 * I was wondering if it was possible to make a ‘Select’ filter with only parents
   attributes.
    When a ‘Select’ option is picked, is it possible to make a new ‘
   Select’ input, with all child-attributes to the parent?
 * A quick example:
 * <select>
    Pick a country: <England> <USA> <Spain> </select>
 * Imagine we chose England, and a new select input appears:
    <London> <Cambridge
   > < a city in England >
 * The attributes are done like this:
    – England — London — Cambridge — A city in
   England – USA — A city in USA – Spain — Barcelona — A city in Spain
 * Is this possible to do?
    I don’t mind extending the code by myself, but it would
   be awesome to get a pointer to where I should mess around with the code. 🙂 Thanks
   in advance.
 * [https://wordpress.org/plugins/woocommerce-ajax-filters/](https://wordpress.org/plugins/woocommerce-ajax-filters/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Dmytro Holovnia](https://wordpress.org/support/users/dholovnia/)
 * (@dholovnia)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/parent-only-filter/#post-5971905)
 * Hi Rubas,
 * It is possible I think. You need to start with includes/widget.php file and find
   there listener function. This one getting ajax request and here you should think
   about the logic of your code. When you will be done here everything else will
   be simple.
 * Sorry, for code examples have no time right now. If will have more time tomorrow
   or day after tomorrow will provide more information.
 * Regards,
    Dima
 *  Thread Starter [Rubas](https://wordpress.org/support/users/rubas/)
 * (@rubas)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/parent-only-filter/#post-5971938)
 * Hi Dima,
 * Thanks for the quick reply!
    I will look into the includes/widget.php
 * Will mess around with it, and thank you very much! 🙂
 *  Plugin Author [Dmytro Holovnia](https://wordpress.org/support/users/dholovnia/)
 * (@dholovnia)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/parent-only-filter/#post-5971956)
 * Rubas,
 * You need to spend some time reading it and as soon as you clearly realize how
   it work you will make it easily. Code is not too hard.
 * Regards,
    Dima

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Parent only filter’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce-ajax-filters/assets/icon-256x256.gif?rev=2770304)
 * [Advanced AJAX Product Filters](https://wordpress.org/plugins/woocommerce-ajax-filters/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-ajax-filters/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-ajax-filters/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-ajax-filters/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-ajax-filters/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-ajax-filters/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Dmytro Holovnia](https://wordpress.org/support/users/dholovnia/)
 * Last activity: [11 years, 2 months ago](https://wordpress.org/support/topic/parent-only-filter/#post-5971956)
 * Status: resolved