How to add contact seller button in product page

You can use woocommerce_single_product_summary hook to add custom button in the single product page in WooCommerce. Please check following example. Custom link added and button class is given to display it like a button. add_action( ‘woocommerce_single_product_summary’, ‘wpso_add_seller_button’, 15 ); function wpso_add_seller_button() { echo ‘<a href=”https://example.com” class=”button”>Contact Seller</a>’; }

Add button to menu item at the same row

Please try something like this. function add_button( $output, $item, $depth, $args ){ if (in_array(“menu-item-has-children”, $item->classes)) { $output=”<button type=”button” class=”btn btn-circle”> <i class=”fa fa-chevron-circle-down”></i> </button>”.$output; } return $output; } add_filter( ‘walker_nav_menu_start_el’, ‘add_button’,10,4);