Setting a custom external link url to a slide

Notice: Since Customizr v3.4.6 and Customizr-Pro 1.2.0 a new set of options has been introduced in the slides editing screen. You will be able to set a custom link url for your image (and button), open it in a new page and link the whole slide.

This snippet will be useful if you need to link a particular slide to an external url.

 

You will need to replace the following texts in the snippet by your values :

MY-IMAGE-ID => this is the WordPress id of the slider’s image for which you need to set the custom link. You can easily find it in the permalink of your media, on the edit screen.

finding-a-wordpress-media-id

MY LINK TITLE => this is the text displayed when hovering the slide’s image

MY-CUSTOM-URL => this is your custom link. Ex : http://www.mywebsite.com

 

Important : for these snippets to work you first need to set a link (that will be overwritten) in the dropdown list when creating the slide

 

Linking the whole slide’s picture to a custom external url

 

Replacing the call to action link by a custom external url

 

Replacing the call to action link by a custom external url opening in a new tab

  1. Replace http://www.google.com by your own url.
  2. Replace MY-IMAGE-ID by your image ID (this must be a number)

 

Where to paste this code? => in your functions.php file. I strongly recommend to create a child theme. Download a start-up child theme here.

Everything you need to know about child theme with Customizr here.

74 thoughts on “Setting a custom external link url to a slide”

Comments are closed.