I have created some articles and business type posts. When i view them in the back end they look fine but preview or live doesnt look the same and under further invstigation the HTML is not in there. It just shows a block of text with no formatting?
Any ideas?
hidden link
Hi Neil,
Thank you for contacting us and I'd be happy to assist.
The "Single Field" block's output is designed to show the content added through the new Block's editor.
When the content is added through the classic editor, like in the case of WYSIWYG field "Content", it is better to use a "Fields and Text" block and then insert the shortcode of that content field ( [types field='content'][/types] ).
This will ensure that formatting is showed correctly on the front-end too.
I hope this helps and please let me know if you need any further assistance around this.
regards,
Waqar
I understand what you mean and have tried this both ways but still get the same result. When i amend the text in the visual WYSIWYG field it looks fine but when i click on the TEXT tab there is no formatting HTML being displayed. Therefore despite efforts either way of displaying the content it still shows as a block as opposed to the view i see in the visual tab of the field.
If i manually edit the html for example adding <br> to show breaks it does carry this through to the live view. Its just when my users input this data they will use the WYSIWYG field and make it look nice with breaks etc and then it wont carry that through
Hi Neil,
As mentioned in my last reply, I've added a "Fields and Text" block and inserted a shortcode of that content field ( [types field='content'][/types] ) at the bottom.
( screenshot: hidden link )
Please note the difference in the output of both these blocks on the front-end.
"Single Field" block: hidden link
"Fields and Text" block: hidden link
I hope this makes it more clear.
regards,
Waqar
Hi Waqar,
Firstly thanks for your help and patience.... I am still having an issue. I added the field as suggested as Fields and Text. What i see in the back end edit view does not carry through to the front live single page view. See attached...
Any ideas?
Hi Neil,
It is strange that the same block and code works in the "Template for Articles" but not in the "Template for Business".
I've wrapped the "Description" field's shortcode inside the "[wpv-autop]...[/wpv-autop]" shortcode and the paragraphs are now correctly showing.
( ref: https://toolset.com/documentation/user-guides/views/views-shortcodes/#wpv-autop )
[wpv-autop]
[types field='description'][/types]
[/wpv-autop]
Screenshot: hidden link
You can use the same technique for other WYSIWYG fields.
regards,
Waqar
My issue is resolved now. Thank you!
I have this issue on another field called Current Opening Details - hidden link
How and where do i actually "wrap" the field....
[wpv-autop]
[types field='description'][/types]
[/wpv-autop]
A step by step would really help...