jQuery(document).ready(function($){ // wait for jQuery to load $(".et-search-form").append('<input type="hidden" name="post_type" value="product" />'); // dynamically add the input below the search box that tells the search that the post type to search are products. $(".et_pb_menu__search-form").each(function() { // now for each search box from the Divi module $(this).append('<input type="hidden" name="post_type" value="product" />'); // add that input there too }); });
Jagdish Sarma Asked question December 1, 2020