Skip Navigation

[Resolved] Show product short description in Template

This support ticket is created 2 years, 8 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 5 replies, has 2 voices.

Last updated by LukaszM 2 years, 8 months ago.

Assisted by: Shane.

Author
Posts
#2367701
Screenshot 2022-05-20 at 15.16.46.png
Screenshot 2022-05-20 at 15.17.17.png

Hi,
I am building custom woocommerce product template.
I would like add Short description below Title as on picture.
I found to use Single field with post excerpt.

1. Problem is I would like to have no limit with words. (post excerpt limit is 40 words max)
2. Also I would like to have html here to add custom buttons. (post excerpt import pure text without html)

Any idea how to solve this

#2367787

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Lukas,

Thank you for getting in touch.

Can you try using the shortcode instead of using the single field block. Try using this shortcode in the classic editor block.
[wpv-post-excerpt]

Please let me know if this helps.
Thanks,
Shane

#2368061

Hi Shane,
shortcode fixed max lenght but it still reads pure text ;/

html code:
<div class="wp-block-buttons">
<div class="wp-block-button">Datasheet</div>
<div class="wp-block-button">Ask for product</div>
</div>

reads:
Datasheet Ask for product

#2369141

my goal is to have custom buttons in products page - downloadable pdf's + any other links.

#2370055

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Lukas,

I believe there is a fundamental misuse of the product short description field.

The formatted content that you want to use should either be added to a custom field or the post body.

So what you can do is to create a custom field for the short description and then add your information there. This way you can use the single field block to retrieve the information with all of the formatting that was added.

Thanks,
Shane

#2372497

Thanks Shane, Custom field saved my day! 🙂
Body wasn't good for me because I had there another content I would like to display below those buttons.

Anyway, create custom field for product template and connect it with normal wp button solved it 🙂