WooCommerce display price before add to cart

I’m trying to make the WooCommerce product price display before the “add to cart” button, however, I cant seem to get the price to display. Here is the code I’m using in my functions.php add_action( 'woocommerce_before_add_to_cart_button', 'misha_before_add_to_cart_btn' ); function misha_before_add_to_cart_btn(){ echo '<div class="btn-price">'. $product->get_price_html().'</div>'; } Please would someone be able to point out where I’m … Read more

Trying to use a variable to set image width

I am writing a WordPress plugin that will display a devotional image. One of the options I would like to include is image width. I am trying to wrap the image and some text in a div so I can style it and let the user chose some different styling options. However, just trying to set the div width using the variable is not working. It says there is a syntax error.