Skip Navigation

[Resolved] User defined class(es) for the loop

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
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Tagged: 

This topic contains 3 replies, has 2 voices.

Last updated by Beda 6 years, 6 months ago.

Assisted by: Beda.

Author
Posts
#918179

Hi, sometimes I think I could write more elegant code if it would be possible to set user defined classes for the loop in views (and also the loop in archive templates). At the moment the output is started with something like this:
<div id="wpv-view-layout-20631" class="js-wpv-view-layout js-wpv-layout-responsive js-wpv-view-layout-20631" data-viewnumber ...>
I think it would be great if I could get something like this:
<div id="wpv-view-layout-20631" class="my-class-name js-wpv-view-layout js-wpv-layout-responsive js-wpv-view-layout-20631" data-viewnumber ...>

Regards,
Roland

#918238

Thanks for the request, I filed this.

I think helpful could be a ShortCode attribute "class" which you could set when you insert a View somewhere on your Website.

That would then add your Custom class to the class attribute which we already use.
This would not allow you to remove those that are there already since we need them, but, you could add your own.

#918297

Hi, that would be exactly what I want. And it never was the question to remove the existing classes, I recognized that you use them 🙂

Do you think this would be implemented soon?

#918311

No, I cannot state any ETA

I apologize that I could not satisfying your need for support.

It is not me that decides when to add a feature, and I cannot add this right now even if I could, so I cannot resolve this problem for you right here and now, but I passed this on to the developers as a feature request.

It may be that they implement this or not, I cannot state this yet.
This usually takes it's time, and once the Developers decide a new development cycle they look at requests and implement what is most needed and possible/requested

You will notice in the ChangeLog once it's released if we implement this

Thanks, and my apologies again that I can not solve this for you right here and now.