Support » Plugin: Kirki Customizer Framework » Refreshing view with hash in url (to stay at the anchor)

  • Resolved macemmek

    (@emmek)


    Hi there,

    I have a following use case.

    I engaged repeater field including image and some other controls to create a full-page intro slideshow for the site.
    Slides change on click. Every slide has an id attribute and when I refresh the browser, I’m taken to the slide which was active before.

    Everything works smoothly even when I preview the front page in Customizer, but… The problem is that making changes in fields, I end inside the first slide on every refresh.

    Could you suggest me, how to bit it? How to stay within the same slide /hash in url/ on refresh?

    Thank you.

Viewing 1 replies (of 1 total)
  • Thread Starter macemmek

    (@emmek)

    Finally, I’ve solved it by:

    1. passing information about recently edited slide via a hidden field in the Customizer
    2. getting the hidden mod/option and giving a CSS class ‘active’ to this slide in PHP template
    3. and, in JavaScript, making a slide with class ‘active’ to appear as the first after page reload.
Viewing 1 replies (of 1 total)
  • The topic ‘Refreshing view with hash in url (to stay at the anchor)’ is closed to new replies.