Add function to head “no product found”

It’s better to use PHP to remove things when possible, because if you just use JS, they’re still technically there on the page. What if a visitor is on a slow-loading network and the JS doesn’t kick in for a long time, so they see the filters long enough to use them? If you can … Read more

get_template_part() not working with Advanced Custom Fields plugin

as you use multiple $testimonials i suppose those are group values. then you need to use get_sub_field() in place of get_field() so it should look like $term = get_queried_object(); $testimonials = get_sub_field(‘testimonials’,$term); echo $testimonials[‘small_title’]; echo $testimonials[‘main_title’]; echo $testimonials[‘description’]; Please refer to ACF documentation when you use non classical fields. https://www.advancedcustomfields.com/resources/group/

Show subcategory name selected in specific category woocoommerce

To display only assigned category you need to change hide_empty to true. Please see the modified code: $args = array( ‘hierarchical’ => 1, ‘show_option_none’ => ”, ‘hide_empty’ => true, ‘parent’ => 134, ‘taxonomy’ => ‘product_cat’ ); $subcats = get_categories($args); echo ‘<ul class=”wooc_sclist”>’; foreach ($subcats as $sc) { $link = get_term_link( $sc->slug, $sc->taxonomy ); echo ‘<li><a … Read more

Proper use of Output Buffer for a whole php clas

Your code does not need to use output buffering anywhere. There’s nowhere that you need it. Your shortcode function is already properly using return for the output output, so nothing needs to be captured, and your popup_bootmodal_form() function is outputting in wp_footer, which is fine, and doesn’t need to be captured either.