I was creating snippets for the listing view page and the vendor view page, and I have two questions:
I want to show a custom field in the vendor view page below the description on the right side. I have created a snippet code as below, but I am not sure how to get the value from demo_custom_field. For now, it just shows a custom field name. Can you please advise?
I have created a snippet to show a custom field in the listing view page that will contain a WPForm shortcode. I have defined a custom field as text, but it does not show the WP form. How should I define this field so it shows the form?
Thanks for the hint, but I wasn’t able to make it work - returns Warning : Attempt to read property “demo_custom_field” on null.
Could you please help me and tell me what I did wrong?
I made changes, but it still shows an error: " Fatal error : Uncaught Error: Call to a member function get_demo_custom_field() on null in…". Could you please share a correct snippet?
Thank you Ihor! It works like a charm. I have an additional question regarding the demo_custom_field on the frontend. I’ve defined it as a Textarea and enabled the option to allow HTML formatting. However, when the text is entered in two rows, on the frontend, it appears as a single line. How can I fix this so that the text is displayed in the same format as it was entered in the backend?
Unfortunately, at the moment, attributes are without line breaks, but we will try to improve this in future updates. As a workaround, we recommend using the br tag HTML br tag