Skip Navigation

[Gelöst] Displaying only one item of each

Dieser Thread wurde gelöst. Hier ist eine Beschreibung des Problems und der Lösung.

Problem:
Displaying only one item of each

Solution:
I've made changes to the javascript code user shred and fixed the issue.

You can find proposed solution, in this case, with the following reply:
https://toolset.com/forums/topic/displaying-only-one-item-of-each/#post-923499

Relevant Documentation:

This support ticket is created vor 6 Jahren, 4 Monaten. 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.

Heute stehen keine Supporter zur Arbeit im Werkzeugsatz-Forum zur Verfügung. Sie können gern Tickets erstellen, die wir bearbeiten werden, sobald wir online sind. Vielen Dank für Ihr Verständnis.

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)

Dieses Thema enthält 3 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von Matthias Reichl vor 6 Jahren, 4 Monaten.

Assistiert von: Minesh.

Author
Artikel
#923359

Hi,

we´ve created a view, which displays all products. There are different products twice and more in this view, because they are set to different categories. To avoid displaying the same products twice, you have sent us the following script a while ago;

[code]
jQuery(document).ready(function(){
var strs = [];
var dupes = [];
jQuery('.wpv-loop').find('li > a').each(function(index,item){
var txt = jQuery(item).text(); if( strs.indexOf(txt) > -1 ) {
dupes.push(index);
} else{
strs.push(txt);
}
});
dupes.reverse();
for(var i=0; i<dupes.length; i++) {
jQuery('.wpv-loop').find('li').eq(dupes[i]).remove();
}
});
[/code]

It doesn´t work anymore - we don´t really know, if it was caused by a toolset update or anything else. We´ven´t changed the loop or the script. The loop classes are right.
Please open a private answer for letting you know all details.

Thanks and regards,

#923466

Minesh
Supporter

Sprachen: Englisch (English )

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

Hello. Thank you for contacting the Toolset support.

Well - Please share problem URL and access details and view name so I can look into it.

*** 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.

#923499

Minesh
Supporter

Sprachen: Englisch (English )

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

Well - I'm able to remove the duplicate but I need to know what is your expected output.
=> versteckter Link

So, I will adjust the content accordingly.

#923549

Hi,

thanks - it seemed that the view was different at live - we could solve it by our own.