Skip Navigation

[Resolved] Can’t comma separate list of Views if there are more than one

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

Problem:

Solution:
You should use shortcode [wpv-item] with index attribute to display comma separated list of users.

You can find proposed solution, in this case, with the following reply:
https://toolset.com/forums/topic/cant-comma-separate-list-of-views-if-there-are-more-than-one/#post-908792

Relevant Documentation:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-item

This support ticket is created 6 years, 7 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

This topic contains 3 replies, has 2 voices.

Last updated by WillL606 6 years, 7 months ago.

Assisted by: Minesh.

Author
Posts
#908665
Screen Shot 2018-06-04 at 9.54.07 PM.png
Screen Shot 2018-06-04 at 10.02.32 PM.png

I am trying to:
Make this: Peter, Tom and Sarah
Instead of: Peter Tom Sarah

Link to a page where the issue can be seen:
hidden link

I expected to see:
I tried to many things and looked into wpv-item, wpv-if etc, but could not get comma separation to work

Instead, I got: Peter Tom Sarah

#908682

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - is it possible to share access details with me so that I can check your view settings with content template that will help me to guide you in right direction.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).

I have set the next reply to private which means only you and I have access to it.

#908792

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - the only possibility to display comma separated list is to use the loop as given under:

<wpv-loop>
      [wpv-item index=1][wpv-post-body view_template="Loop item in Author Name"]
      [wpv-item index=other], [wpv-post-body view_template="Loop item in Author Name"]
	</wpv-loop>

As we do not have a way to track which will be the last record that is why we can not add "and" before displaying the last entry. If you still want same result as you requested, you need to write custom shortcode.

More info:
=> https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-item

#909094

Thank you, Minesh.
I am fine with just the commas.
W