This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Woocommerce and custom field results

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Woocommerce and custom field results

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #48454
    justinhollender48justinhollender48
    Participant

    I am trying to use the Ajax Search Pro plugin to filter our Woocommerce products by custom fields that we have set up. I can’t get the results to populate in the main content area. Could you please take a look and let me know if I’m missing something?

    I’m trying to replace the functionality of WP Facet filters that we are currently using on our live site: https://www.truebuilthome.com/home-plans/

    Thank you!

    #48458
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi!

    Thank you very much for the details, it helps a lot!

    You are looking for the generic front-end filters, the taxonomy term and custom field filters section. These documentation should hopefully explain everything you may need.

    Then once you get it configured, you can either use the blocks or the shortcodes to place the filters to the position you need.

    #48467
    justinhollender48justinhollender48
    Participant

    Hey Ernest,

    I think I got it working. I do have a request though. Would it be possible to have a field to add a CSS class to the legend or the fieldset for each filter so that they can be styled? It would also be nice to have a reset option per filter to clear them individually.

    Thanks,

    Justin

    #48468
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Great!

    The fieldsets have classes based on the field or taxonomy names, so you can actually target the fieldset as well as the legend element, like so:

    /* For taxonomy term filters */
    .asp_filter_tax_{taxonomy_name} {
    }
    
    .asp_filter_tax_{taxonomy_name} legend {
    }
    
    /* For custom field filters */
    .asp_filter_cf_{field_name} {
    }
    
    .asp_filter_cf_{field_name} legend {
    }

    Just replace the {taxonomy_name} and the {field_name} in the above code to the corresponding taxonomy or custom field names.

    #48472
    justinhollender48justinhollender48
    Participant

    Thanks

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.