Skip Navigation

[Resolved] Ticket Repost – Remove Comma from Category Description

This support ticket is created 4 years, 12 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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

Tagged: 

This topic contains 2 replies, has 2 voices.

Last updated by hyukP 4 years, 11 months ago.

Assisted by: Nigel.

Author
Posts
#1403525
GB-Toolset-page-builder-view.jpg
GB-category-description-comma.jpg

I am trying to:
Present Product category description without a comma.
When Woocommerce product ins in multiple categories a comma appears when using the shortcode.
I tested this by placing a product in one category and multiple categories.
When in one category there is no comma. When in multiple categories the comma appears.
How do I not have the comma appear when in multiple categories?

Link to a page where the issue can be seen:
hidden link

I expected to see:
No Comma

Instead, I got:
A comma.

#1404329

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

The problem is that you are outputting the description of the product category, not the name of the product category, and not all of your product categories have descriptions, so the shortcode creates a place for the description, but the description itself is empty.

The default separator for multiple taxonomy terms is a comma, so I suggest you resolve the problem by updating the wpv-post-taxonomy shortcode to include the separator attribute as an empty string, or perhaps a space if you may be outputting more than one description, i.e.

[wpv-post-taxonomy type="product_cat" format="description" separator=" "]
#1405051

My issue is resolved now. Thank you!