Skip Navigation

[Resolved] [wpv-item] and spaces

This thread is resolved. Here is a description of the problem and solution.

Problem:

Remove blank space within Views loop.

Solution:

You can try to merge all codes into one single line, see the solution here:
https://toolset.com/forums/topic/wpv-item-and-spaces/#post-886457

Relevant Documentation:

This support ticket is created 6 years, 6 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/Hong_Kong (GMT+08:00)

This topic contains 2 replies, has 2 voices.

Last updated by PiotrO586 6 years, 6 months ago.

Assisted by: Luo Yang.

Author
Posts
#883620

Hi, it's small issue, but maybe there's solution:

I'm displaying taxonomy terms through view, to be able to set up my own links:

		<wpv-loop>
			[wpv-item index=1]
				<a href="/aaa/?wpv-product_tag=[wpv-taxonomy-slug]">[wpv-taxonomy-title]</a>
			[wpv-item index=other]
				, <a href="/aaa/?wpv-product_tag=[wpv-taxonomy-slug]">[wpv-taxonomy-title]</a>
		</wpv-loop>

As a result, when there is more than 1 item, the terms are displayed with extra space before ",", e.g., term1 , term2. Apparently the loop adds space after each item. Can it be fixed?

#886457

Hello,

Please try to merge all codes into one single line and test again, like this:

<wpv-loop>[wpv-item index=1]<a href="/aaa/?wpv-product_tag=[wpv-taxonomy-slug]">[wpv-taxonomy-title]</a>[wpv-item index=other], <a href="/aaa/?wpv-product_tag=[wpv-taxonomy-slug]">[wpv-taxonomy-title]</a></wpv-loop>
#887892

Hi Luo, thank you. That helped. I did this before I posted the issue, but apparently not exactly the same way.