Skip Navigation

[Resolved] Raw view output has a TON of white space around the field

This support ticket is created 5 years, 11 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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 3 replies, has 2 voices.

Last updated by Waqar 5 years, 10 months ago.

Assisted by: Waqar.

Author
Posts
#1175242

Hi team,

I created a view with a raw output, but have noticed 2 things:

1.) There seems to be a trailing whitespace before the next character starts, and I'm not sure why that is.

2.) When you view source, there appears to be a _ton_ of whitespace for no reason and it just adds to the HTML for no reason.

Please see the following: hidden link

Thanks and have a happy new year!

#1175346

Hi there,

Thanks for asking! I'd be happy to help.

To remove the empty spaces from your two views, you can follow these steps:

1. Please go to the view's edit screen and remove all empty spaces and line breaks from the "Loop Editor" section, making sure all the tags in there are in a single line.
( example screenshot: hidden link )

2. Similarly, check your view's content template section and make sure there are no empty spaces or line breaks.

3. From the "Output Editor" section remove the shortcode "[wpv-filter-meta-html]".

I hope this helps and please let me know how it goes.

regards & Happy New Year,
Waqar

#1175446

Thank you, that solution worked perfectly and as expected! For my own understanding, and future people that may stumble upon this thread, what was the reason behind removing the "[wpv-filter-meta-html]" shortcode?

#1175989

Thanks for the update and glad my message helped!

The "[wpv-filter-meta-html]" shortcode ( ref: https://toolset.com/documentation/user-guides/views-shortcodes/#vf-154437 ) outputs the pagination and search form filters (when in use), specifically what is added in the "Search and Pagination" section.
( screenshot: hidden link )

For a view in which pagination and search filter controls are not used, it is safe to remove that shortcode.

regards,
Waqar