{"id":682,"date":"2021-02-28T14:04:18","date_gmt":"2021-02-28T14:04:18","guid":{"rendered":"https:\/\/ithemelandco.com\/docs\/woocommerce-product-table\/?p=682"},"modified":"2025-04-12T10:56:36","modified_gmt":"2025-04-12T10:56:36","slug":"how-to-create-a-search-form-by-category-and-attributes","status":"publish","type":"post","link":"https:\/\/ithemelandco.com\/docs\/woocommerce-product-table\/how-to-create-a-search-form-by-category-and-attributes\/","title":{"rendered":"How to create a WooCommerce search box form by category and attributes in WooCommerce product table plugin?"},"content":{"rendered":"\n<p>Search form is an essential part of an Ecommerce website. It can help customers to find their preferred products quickly and easily by filtering their requirements. In this plugin you can create WooCommerce search product form to search products by category, tags, attribute and other filtrable fields.<\/p>\n\n\n\n<p>As you can see in the below picture, there is no search box in this product table by default:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><a href=\"https:\/\/ithemelandco.com\/docs\/woocommerce-product-table\/wp-content\/uploads\/sites\/3\/2021\/02\/10-product-table-without-search-form.jpg\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1123\" height=\"633\" src=\"https:\/\/ithemelandco.com\/docs\/woocommerce-product-table\/wp-content\/uploads\/sites\/3\/2021\/02\/10-product-table-without-search-form.jpg\" alt=\"product table without search form enable\" class=\"wp-image-691\" style=\"width:1024px;height:633px\"\/><\/a><\/figure>\n\n\n\n<p>So, in this Tutorial we want to show you how to create a search form by category and attributes of your products. This can help to improve your customer experience when purchasing things from your online store.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Create a WooCommerce Search form<\/strong><\/h2>\n\n\n\n<p>To create a WooCommerce custom search form you have to go to the \u201c<strong>Search box and Pagination<\/strong>\u201d in the Woocommerce product table plugin. Then mark the checkbox next to \u201c<strong>Enable<\/strong>\u201d under \u201c<strong>Search Enable\/disable<\/strong>\u201d Field:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><a href=\"https:\/\/ithemelandco.com\/docs\/woocommerce-product-table\/wp-content\/uploads\/sites\/3\/2021\/02\/08-enable-search-form.jpg\"><img decoding=\"async\" width=\"1140\" height=\"496\" src=\"https:\/\/ithemelandco.com\/docs\/woocommerce-product-table\/wp-content\/uploads\/sites\/3\/2021\/02\/08-enable-search-form.jpg\" alt=\"Enable search form in woocommerce product table plugin\" class=\"wp-image-638\" style=\"width:1140px;height:496px\"\/><\/a><\/figure>\n\n\n\n<p>Now by scrolling down, you can see many different options which are available for managing the items for filtering the products in the table.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Enable WooCommerce search by category in the search form<\/strong><\/h2>\n\n\n\n<p>Enabling customers to search the WooCommerce products by category is possible by marking the check box next to \u201c<strong>Enable Product Categories<\/strong>\u201d.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><a href=\"https:\/\/ithemelandco.com\/docs\/woocommerce-product-table\/wp-content\/uploads\/sites\/3\/2021\/02\/10-active-search-by-category.jpg\"><img decoding=\"async\" width=\"799\" height=\"244\" src=\"https:\/\/ithemelandco.com\/docs\/woocommerce-product-table\/wp-content\/uploads\/sites\/3\/2021\/02\/10-active-search-by-category.jpg\" alt=\"Enable search by category in woocomemrce product table plugin\" class=\"wp-image-692\" style=\"width:799px;height:244px\"\/><\/a><\/figure>\n\n\n\n<p>Now, let\u2019s go and see how these settings changes the appearance of our product table by clicking on \u201c<strong>Update<\/strong>\u201d and opening the table page:<\/p>\n\n\n\n<p>That\u2019s really amazing. The Search Form has been displayed at the top of the table. Now, customers can filter the products by their categories after clicking on next to the search box.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><a href=\"https:\/\/ithemelandco.com\/docs\/woocommerce-product-table\/wp-content\/uploads\/sites\/3\/2021\/02\/08-search-form-in-front-end.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"688\" height=\"367\" src=\"https:\/\/ithemelandco.com\/docs\/woocommerce-product-table\/wp-content\/uploads\/sites\/3\/2021\/02\/08-search-form-in-front-end.jpg\" alt=\"Search form after enable it in Woocommerce product table plugin\" class=\"wp-image-636\" style=\"width:688px;height:367px\"\/><\/a><\/figure>\n\n\n\n<p>But this is not the end of story, your customers can also&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>See the list of your categories and select one of them<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Select how to order for display product in the table: Ascending or Descending<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><a href=\"https:\/\/ithemelandco.com\/docs\/woocommerce-product-table\/wp-content\/uploads\/sites\/3\/2021\/02\/10-category-andsort-filters.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"1123\" height=\"564\" src=\"https:\/\/ithemelandco.com\/docs\/woocommerce-product-table\/wp-content\/uploads\/sites\/3\/2021\/02\/10-category-andsort-filters.jpg\" alt=\"Sort products by title in woocommerce product table plugin\" class=\"wp-image-696\" style=\"width:1123px;height:564px\"\/><\/a><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Enable WooCommerce search by attributes in the search form<\/strong><\/h2>\n\n\n\n<p>As you may notice to the fields under \u201c<strong>Category \/ Taxonomy<\/strong>\u201d in the \u201c<strong>Searchbox and Pagination<\/strong>\u201d tab, all of the attributes related to your products have been listed there and you can choose any of them to be displayed in the search form:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><a href=\"https:\/\/ithemelandco.com\/docs\/woocommerce-product-table\/wp-content\/uploads\/sites\/3\/2021\/02\/10-filter-by-product-attribute.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"804\" height=\"383\" src=\"https:\/\/ithemelandco.com\/docs\/woocommerce-product-table\/wp-content\/uploads\/sites\/3\/2021\/02\/10-filter-by-product-attribute.jpg\" alt=\"Enable filter by custom taxonomy in product table plugin\" class=\"wp-image-697\" style=\"width:804px;height:383px\"\/><\/a><\/figure>\n\n\n\n<p>For example, we selected \u201c<strong>Enable Product Color<\/strong>\u201d and our filter form turned out to be like below:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><a href=\"https:\/\/ithemelandco.com\/docs\/woocommerce-product-table\/wp-content\/uploads\/sites\/3\/2021\/02\/10-filter-products-by-color.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"1122\" height=\"624\" src=\"https:\/\/ithemelandco.com\/docs\/woocommerce-product-table\/wp-content\/uploads\/sites\/3\/2021\/02\/10-filter-products-by-color.jpg\" alt=\"Filter products by product color in product table plugin\" class=\"wp-image-698\" style=\"width:1122px;height:624px\"\/><\/a><\/figure>\n\n\n\n<p>As it is shown in the above, a search box named product color has been added to the search form. This field enable customers to filter their products by selecting their favorite color.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Add attributes to the search forms<\/strong><\/h3>\n\n\n\n<p>There is no need to be worried about adding attributes of products to the search fields. As soon as you add one attribute to the products, an extra field will be added to the \u201c<strong>Search Box and pagination<\/strong>\u201d tab, automatically.<\/p>\n\n\n\n<p>For example, we decided to add \u201c<strong>Material<\/strong>\u201d as an attribute to our products.<\/p>\n\n\n\n<p>We added it to the Attributes of products as you can see in the below picture:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><a href=\"https:\/\/ithemelandco.com\/docs\/woocommerce-product-table\/wp-content\/uploads\/sites\/3\/2021\/02\/10-add-attribute-in-woocommerce.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"1141\" height=\"565\" src=\"https:\/\/ithemelandco.com\/docs\/woocommerce-product-table\/wp-content\/uploads\/sites\/3\/2021\/02\/10-add-attribute-in-woocommerce.jpg\" alt=\"add new attribute in woocommerce\" class=\"wp-image-1788\" style=\"width:1141px;height:565px\"\/><\/a><\/figure>\n\n\n\n<p>We also added \u201cWool\u201d and \u201cCotton\u201d under \u201cMaterial\u201d attribute in the configure items as below:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><a href=\"https:\/\/ithemelandco.com\/docs\/woocommerce-product-table\/wp-content\/uploads\/sites\/3\/2021\/02\/10-add-term-to-custom-attribute-in-woocommerce.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"990\" height=\"399\" src=\"https:\/\/ithemelandco.com\/docs\/woocommerce-product-table\/wp-content\/uploads\/sites\/3\/2021\/02\/10-add-term-to-custom-attribute-in-woocommerce.jpg\" alt=\"add new item to attribute in woocommerce\" class=\"wp-image-695\" style=\"width:990px;height:399px\"\/><\/a><\/figure>\n\n\n\n<p>When we came back to the \u201c<strong>Search Box and Pagination<\/strong>\u201d tab, we observed that the magic had happened and the \u201cMaterial\u201d had been added as a field. So, we enabled by clicking on the check mark to see how the search form in the table would be:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><a href=\"https:\/\/ithemelandco.com\/docs\/woocommerce-product-table\/wp-content\/uploads\/sites\/3\/2021\/02\/10-add-product-material-filter.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"804\" height=\"199\" src=\"https:\/\/ithemelandco.com\/docs\/woocommerce-product-table\/wp-content\/uploads\/sites\/3\/2021\/02\/10-add-product-material-filter.jpg\" alt=\"enable filter by material in woocommerce product table plugin\" class=\"wp-image-694\" style=\"width:804px;height:199px\"\/><\/a><\/figure>\n\n\n\n<p>This is how our product table changed:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><a href=\"https:\/\/ithemelandco.com\/docs\/woocommerce-product-table\/wp-content\/uploads\/sites\/3\/2021\/02\/10-filter-products-by-material.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"1117\" height=\"487\" src=\"https:\/\/ithemelandco.com\/docs\/woocommerce-product-table\/wp-content\/uploads\/sites\/3\/2021\/02\/10-filter-products-by-material.jpg\" alt=\"filter by material in woo product table plugin\" class=\"wp-image-699\" style=\"width:1117px;height:487px\"\/><\/a><\/figure>\n\n\n<div id=\"rank-math-faq\" class=\"rank-math-block\">\n<div class=\"rank-math-list \">\n<div id=\"faq-question-649dc2ebb323e\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \">Which fields could be search in product search form?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>You can search product by title, attributes, taxonomies (like category and tags) and any custom taxonomies.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-649dc2ebb3240\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \">Can I sort filtered products using product search form?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Yes, you can sort product by ID, title, SKU and many other fields ascending or descending.<\/p>\n\n<\/div>\n<\/div>\n<\/div>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>Search form is an essential part of an Ecommerce website. It can help customers to find their preferred products quickly and easily by filtering their requirements. In this plugin you can create WooCommerce search product form to search products by category, tags, attribute and other filtrable fields. As you can see in the below picture, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-682","post","type-post","status-publish","format-standard","hentry","category-plugin-usage"],"_links":{"self":[{"href":"https:\/\/ithemelandco.com\/docs\/woocommerce-product-table\/wp-json\/wp\/v2\/posts\/682","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ithemelandco.com\/docs\/woocommerce-product-table\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ithemelandco.com\/docs\/woocommerce-product-table\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ithemelandco.com\/docs\/woocommerce-product-table\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ithemelandco.com\/docs\/woocommerce-product-table\/wp-json\/wp\/v2\/comments?post=682"}],"version-history":[{"count":0,"href":"https:\/\/ithemelandco.com\/docs\/woocommerce-product-table\/wp-json\/wp\/v2\/posts\/682\/revisions"}],"wp:attachment":[{"href":"https:\/\/ithemelandco.com\/docs\/woocommerce-product-table\/wp-json\/wp\/v2\/media?parent=682"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ithemelandco.com\/docs\/woocommerce-product-table\/wp-json\/wp\/v2\/categories?post=682"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ithemelandco.com\/docs\/woocommerce-product-table\/wp-json\/wp\/v2\/tags?post=682"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}