Have the widget link to a url

roger's Avatar

roger

16 Mar, 2017 02:11 PM

Hi,

I'm asking perhaps something unusual, but what I need is this:

  • When the user clicks inside the image area in the widget, to link to an arbitrary url (typically it will be a post with the full version of the slider)
  • The left and right arrows work as usual when highlighted
  • The slider conrinues to autoplay normally when the mouse is outside the area.

So basically, I need to replace the "hand drag" action of the mouse with a "link to url" action. Is this feasible, for a specific slider of course ?

Thanks for your help!

RP

  1. Support Staff 1 Posted by Dmitry Semenov on 16 Mar, 2017 03:44 PM

    Dmitry Semenov's Avatar

    Hello,

    You may set any link for each slide, and auto-play feature has "pause on hover" functionality. Please elaborate what exactly part you don't know how to implement, or link to the page that you're working on.

    Dmitry

  2. 2 Posted by roger on 17 Mar, 2017 02:55 PM

    roger's Avatar

    Hi Dmitry,

    Thanks for the always quick response. I’ll try to be clearer with a picture of the widget (attached). I’d give you a link but the site is closed right now.

    To make it short, I’d need the center area of ALL the images in the slider inside the widget (there are about 70 of them), to link to the same url while keeping the functionality of the arrows and mouseover.

    Is this feasible in a practical way ?

    Thanks,

    RP

    De : Dmitry Semenov [mailto:[email blocked]]
    Envoyé : jeudi 16 mars 2017 16:44
    À : Roger Politis <[email blocked]>
    Objet : Re: Have the widget link to a url [RoyalSlider WordPress Issues #45811]

  3. Support Staff 3 Posted by Dmitry Semenov on 17 Mar, 2017 03:20 PM

    Dmitry Semenov's Avatar

    Oh, you may use Slide Markup Editor (in General Options of slider) to add specific content into each slide.

    e.g. add somewhere after {{image_tag}}:

    <a class="rsLink" href="http://your-link.com"></a>
    

    and you'll get a link in each slide.

  4. 4 Posted by roger on 17 Mar, 2017 03:33 PM

    roger's Avatar

    Ok, it works – but it solves half of my problem: when I click on the widget it does take me to the post where the full size slider is, but if I click on an image there it will loop on the same post of course.

    One (ugly) solution would be to make a copy of the slider, and use 2 different ones, one for the widget and one for the post. Is there a way to avoid this, and make the link work only on the widget ? Is there a tag for this in the slide markup ?

    Thanks

    RP

    De : Dmitry Semenov [mailto:[email blocked]]
    Envoyé : vendredi 17 mars 2017 16:21
    À : Roger Politis <[email blocked]>
    Objet : Re: Have the widget link to a url [RoyalSlider WordPress Issues #45811]

  5. Support Staff 5 Posted by Dmitry Semenov on 17 Mar, 2017 04:03 PM

    Dmitry Semenov's Avatar

    oooh, you want to use the same slider... I understand the question now.

    This can be implemented via JS - you'll need to append <a> element to each slide (this should be done before the slider initialization), or bind the click event on .rsContainer element and navigate to URL (this should be done after initialization).

    It also can be done via PHP, you may disable slider cache and create custom variable for Slide Markup Editor that would print link only on some specific page http://help.dimsemenov.com/kb/wordpress-royalslider-advanced/wp-add...

  6. 6 Posted by roger on 17 Mar, 2017 04:26 PM

    roger's Avatar

    Yes, the same slider – that was the whole point!

    I get the 2 solutions. I’m not familiar with js but I know php and I understand how I can make the second one work. Don’t know if it’s worth the effort though, I’ll see what makes more sense.

    Thanks!

    RP

    De : Dmitry Semenov [mailto:[email blocked]]
    Envoyé : vendredi 17 mars 2017 17:03
    À : Roger Politis <[email blocked]>
    Objet : Re: Have the widget link to a url [RoyalSlider WordPress Issues #45811]

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac