Nicely formatting view code that leads to nicely formatted output

By: Rob LeVine | Asked: 02/28/2023
ForumsCategory: How-toNicely formatting view code that leads to nicely formatted output
Rob LeVineRob LeVine asked 2 years ago
I'm willing to fall on my sword for the benefit of others on this one. I'm using a View (Classic) and I like to enter everything in the Text tab with nice line spacing and HTML comment tags so it's more readable. See example here. When I display the view in the front end, all my spacing and comments end up as paragraph tags in the output which display as blank lines that I don't want. Is there a way to have the view "code" be easy to read and have it not appear with extra lines? I've spent years working around this by eventually mashing all the code together (kinda like minifying) and I really don't want to do that anymore. I guess I could write from jQuery to remove all the occurrences of empty paragraph tags, but not even that would solve the problem.
2 Answers
Victor Font answered 2 years ago
Did you disable wpautop?
Rob LeVineRob LeVine replied 2 years ago

Oh kill me. I've spent all this time slogging over it and the answer was that simple? Thanks Victor 🙂

Shawn Pery answered 2 years ago

I noticed this as well. It happens to me all the time. I opened a support ticket regarding it, but they said they couldn\'t replicate it and I didn\'t have time to keep providing more evidence that this was happening. Here is another thread about the same issue:https://connect.formidableforms.com/question/category/code-snippets/these-html-tags-keep-appearing-on-my-posts/ 

Attachments

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right