Saltar navegación

[Resuelto] reload page after last item in slider

This support ticket is created hace 6 años, 1 mes. 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 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Etiquetado: ,

Este tema contiene 12 respuestas, tiene 2 mensajes.

Última actualización por claudioM-3 hace 6 años.

Asistido por: Shane.

Autor
Mensajes
#1165437

Tell us what you are trying to do?

I have a view slider that display several post's image.

I want that the loop could be update with new post added in time.

The solution can be add a function to reload page after last post in loop.

In the advanced option of ajax automatic impagination there is the possibility to add a function js but this add the function to each item transition.

I want a solution to have a continuous updated slider with js reload function to add to last item or other solution.

Thanks

#1165559

Shane
Supporter

Idiomas: Inglés (English )

Zona horaria: America/Jamaica (GMT-05:00)

Hi Claudio,

Thank you for contacting our support forum.

Actually our views plugin already does this. When a new post is added the view will automatically add it as a new slide so there isn't any need for a special function.

Perhaps i'm misinterpreting what you are trying to do.

Thanks,
Shane

#1165605

Thanks. Yes the view add the new post but no if have already open the page with slider in function.

So I have a view page open with slider item
In other page I add new post
In view slider page already opened is not added the new post.

How can I do this?

#1165628
Creating-sliders-Slider-settings11.png

Callback function, see attached, not work, it call function for each item and not on the last (end pagination)

I had js function to reload page... but the page reload after first slide in loop

#1165746

Shane
Supporter

Idiomas: Inglés (English )

Zona horaria: America/Jamaica (GMT-05:00)

Hi Claudio,

Perhaps if there was an AJAX listener that is listening for changes to the databases then this could work.

Unfortunately this would need to be done using custom coding which is out of the scope of what we can provide here as support.

I would recommend contacting a contractor that is registered with us for assistance with this one.
https://toolset.com/contractors/

Thanks,
Shane

#1165801

but strange that there are functions to add to each item and not one at the end of a cycle .......

#1165802

I do not want it to be reloaded as soon as a new post is added .. but only at the end of the cycle

#1165806

Shane
Supporter

Idiomas: Inglés (English )

Zona horaria: America/Jamaica (GMT-05:00)

Hi Claudio,

What are you referring to.

Do you mean at the end of the slider page, that you can add a new slider from there?

I'm a bit confused

Thanks,
Shane

#1165814

Example of scenario:

I have this loop:

<wpv-loop pad="true">
      <div class="item" style="background-image:url('[wpv-post-featured-image size="full" output="url"]');">
      </div>
    </wpv-loop>

paginated with ajax slider

I have this view in a EXAMPLE_PAGE open on a big screen and I already have 100 posts (images) flowing in the slider.

If during the flowing I add another post the view page, when finished all post, not show me the last added unless I reload the page. (I want new photo only after end without listner)

So the solution is add a simple reload page when the post in the loop slider end. Is it possible that there is not a way to add a function at the end of the loop ? Or else your flash of genius? I can not be clearer than that 🙂

Thanks

#1166326

Shane
Supporter

Idiomas: Inglés (English )

Zona horaria: America/Jamaica (GMT-05:00)

Hi Claudio,

Now I get what you are saying. This would be possible if there was a callback function for it however there isnt.

However the js code that is needed would be.

document.location.reload() ;

Thanks,
Shane

#1166350

So no solution? Possible?

#1166439
<div  class="donkey">[wpv-found-count]</div>



var numbItem = document.getElementsByClassName("donkey")[0].innerHTML;
var interval = numbItem * 5000;
setTimeout(function(){
window.location.reload()}, interval);

bad support..

#1166441

My issue is resolved now.