Skip Navigation

[Resolved] Remove the space before comma in Views index multiple items in loop

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

Problem:

There is an extra space between parent items in my view, I just need to know how to remove it.

Solution:

You can try these:

https://toolset.com/forums/topic/remove-the-space-before-comma-in-views-index-multiple-items-in-loop/#post-1634105

Relevant Documentation:

This support ticket is created 3 years, 10 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 richardG-4 3 years, 10 months ago.

Assisted by: Luo Yang.

Author
Posts
#1633963

Tell us what you are trying to do?
There is an extra space between parent items in my view, I just need to know how to remove it.
Here is a screenshot: hidden link
Here is the code I'm using:

 
[wpv-layout-start]
	[wpv-items-found]
	<!-- wpv-loop-start -->
	Presented by:
	<wpv-loop>
		[wpv-item index=1][wpv-post-body view_template="loop-item-in-audio-class-presenters-and-meta"]
      	[wpv-item index=other], [wpv-post-body view_template="loop-item-in-audio-class-presenters-and-meta"]
	</wpv-loop>
	<!-- wpv-loop-end -->
	[/wpv-items-found]
	[wpv-no-items-found]
		<strong>[wpml-string context="wpv-views"]No items found[/wpml-string]</strong>
	[/wpv-no-items-found]
[wpv-layout-end]

Is there any documentation that you are following?
This question wasn't answered on this topic from a few years ago:
https://toolset.com/forums/topic/views-showing-result-loop-separated-with-commas/#post-1633961

What is the link to your site?
hidden link

#1634105

Hello,

You can try these:
1) Replace the codes you mentioned above from:

...
    <wpv-loop>
        [wpv-item index=1][wpv-post-body view_template="loop-item-in-audio-class-presenters-and-meta"]
        [wpv-item index=other], [wpv-post-body view_template="loop-item-in-audio-class-presenters-and-meta"]
    </wpv-loop>
...

To:

...
    <wpv-loop>[wpv-item index=1][wpv-post-body view_template="loop-item-in-audio-class-presenters-and-meta"] [wpv-item index=other], [wpv-post-body view_template="loop-item-in-audio-class-presenters-and-meta"]</wpv-loop>
...

2) Edit content template "loop-item-in-audio-class-presenters-and-meta", and remove all space in it.

#1634121

That did it, thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.