Displaying Woocommerce additional information, title, price, excerpt, add to cart button

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.

Hello There,

Thanks for writing in! Regretfully, this particular customization request is outside the scope of our support as this is not related to an issue with the theme and instead has to do with your customization of it. As such, you will need to investigate this particular issue on your own or seek help from a developer should you not feel comfortable making these changes yourself. We do have an in-house custom development team that offer paid services, who may be able to assist. They can be contacted at pinnacle@theme.co if this is of interest to you. If you have any further questions about the theme, we are more than happy to provide you with assistance on these inquiries.

Meanwhile, as you have mentioned that you have search around and tried doing it yourself. I would recommend that you use Essential Grid instead of the WooCommerce shortcode. With Essesntial grid, you can create or edit a skin and add more items in it easily without even adding any single code. You can check out the documentation here: https://www.themepunch.com/essgrid-doc/item-skin-editor/

Thank you for your understanding.

Hi RueNel, thanks for letting me know. I’ve got my hands on Essential Grid and I’m working with that at the moment to get my layout how I want it. Thank you for the tip.

Ant

You’re welcome.