Comment Form Development Issue

I resolved the case. Problem here was on &fields variable declaration and also to ‘comment_field’ assignment. I had to change name fields with the correct ones. Check code below: function dck_custom_comment_form() { //Declare Vars $comment_author=”Name *”; $comment_email=”Email *”; $comment_body = ‘Comment *’; $comment_cookies_1 = ‘ By commenting you accept the’; $comment_cookies_2 = ‘ Privacy Policy’; … Read more

How can I prevent a shortcode div from extending beyond its boundaries?

because I’m not echoing anything in this code. But you are! This code: function smb_function( $atts ) { ?> <div class=”social_button_shortcode”><?php Is the same as: function smb_function( $atts ) { echo ‘ <div class=”social_button_shortcode”>’; Likewise with the closing div tag at the end. Any form of direct output in a shortcode will break it, wether … Read more

How do I make my terms for each product display via foreach loop? (woocommerce)

The problem is here: while ( $query->have_posts() ) { $query->the_post(); function filter_categories($categories) { foreach ($categories as $category) { echo $category->name; } } You shouldn’t declare a function inside a loop. Every time it loops around the filter_categories function gets declared again, but named functions can only be declared once, so it crashes the second time … Read more

How do I add filter with woocommerce categories?

I was missing the condition for the array inside the tax_query array. It is important to have it regardless if you have one or more conditions. $term_search = get_queried_object()->slug; // WP_Query arguments $args = array( ‘p’ => ‘product’, ‘post_type’ => array( ‘product’ ), ‘order’ => ‘ASC’, ‘post_per_page’ => 20, ‘tax_query’ => array(array( ‘taxonomy’ => ‘product_cat’, … Read more