Format and Style for Dynamic Content

Hi,
Do you have a document about styling for dynamic content strings eg Price: £{{dc:post:meta key=“price”}}
I wish to format the price as a number with no decimals
https://loving-tu.77-68-9-139.plesk.page/boats-for-sale-summary/
Many thanks

Hello @tapper65,

Thanks for writing to us.

In order to remove the decimal value, I would suggest you go to the WooCommerce -->General–>Number of decimals and set it as “0”

I would also suggest you please use this “{{dc:woocommerce:product_price_html}}” dynamic content code for the price.

Hope it helps
Thanks

Hi,
The boats are custom post types using ACF fields and not related to WooCommerce.
Attached is a screenshot of the relevant dynamic field. I have seen videos with Corey adding formatting and styling within the text field. My question relates to how I can add style and format in those fields.
Thanks

Hi @tapper65,

The Number field type of ACF supports the decimal values which can’t be reformatted while fetching it through the Dynamic Content. A only few predefined Dynamic Content have the formatting and attributes options, like the Publish Date has the date Formatting option, whereas the Excerpt has the Length option.

Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.