Hi there,
I’m having fun playing with Pro Theme but have come up against a snag. I’ve searched the forums but not found a solution.
I’m creating individual product pages and in a current example, for candles: http://www.photooncake.co.uk/candles-v2/, I have used the shortcode [product_category category=“birthday candles” number=“30” per_page=“30”] to bring in a certain category of candles.
Initially, all this did was bring in product photos and nothing else. I’ve managed to add the short description by adding the following code to my child theme’s functions.php.
add_action( 'woocommerce_after_shop_loop_item_title', 'output_product_excerpt', 35 );
function output_product_excerpt() {
global $post;
echo $post->post_excerpt;
}
That has all worked nicely, but that’s not all I want to add. Ideally I want to be able to show:
Product image (there as standard)
Product title
Product price
Short description (added already as per the code above)
Add to cart button
I’m not a .php expert. I’ve spent hours trawling the web this morning to find a solution and I’ve had no luck. Are you able to help please?
I’m sure it’s something simple as Woocommerce has the hooks that I need like the_title(), get_price() and so on. I just don’t know how to get them to display.
Thanks in advance of your support.