Display custom HTML under any elements,
//add_action('wcps_layout_element_$id','wcps_layout_element_$id', 10); // $id = 'post_title' // $id = 'wrapper_start' // $id = 'wrapper_end' // $id = 'thumbnail' // $id = 'content' // $id = 'product_category' // $id = 'product_tag' // $id = 'sale_count' // $id = 'featured_mark' // $id = 'on_sale_mark' // $id = 'add_to_cart' // $id = 'rating' // $id = 'product_price' // $id = 'product_id' add_action('wcps_layout_element_post_title','wcps_layout_element_post_title_20200331', 10); function wcps_layout_element_post_title_20200331($args){ $product_id = isset($args['product_id']) ? $args['product_id'] : ''; $elementData = isset($args['elementData']) ? $args['elementData'] : array(); $element_index = isset($args['element_index']) ? $args['element_index'] : ''; ?> <div>Custom text for post title</div> <?php }
Display custom link
add_action('wcps_layout_element_post_title','wcps_layout_element_post_title_20200331', 90); function wcps_layout_element_post_title_20200331($args){ $product_id = isset($args['product_id']) ? $args['product_id'] : ''; $elementData = isset($args['elementData']) ? $args['elementData'] : array(); $element_index = isset($args['element_index']) ? $args['element_index'] : ''; ?> <a class="button" href="<?php echo get_permalink($product_id); ?>">See details</a> <?php }