• Hey all,

    So I’m basically trying to get done what is described in this Customizr support thread:

    https://www.themesandco.com/snippet/setting-a-custom-external-url-to-a-slide/comment-page-1/#comment-91583

    Setting up a slider image to link to a page is not a problem, but as soon as I try the array style of linking multiple slide images to multiple pages it just doesn’t do anything. The individual slides have links set up to be overwritten, all the other fields are empty as I don’t want any of that stuff. I use this code:

    add_filter('tc_slide_link_url' , 'my_slide_custom_link', 10 , 2 );
    function my_slide_custom_link( $slide_link , $image_id ) {
        //custom links array : image_id => link
        $image_links = array(
            '741' => 'https://www.sky-design.nl/portfolio/beursstand-ontwerp-voor-lifehammer-products/',
            '742' => 'https://www.sky-design.nl/portfolio/t-shirt-design-voor-vishwaraj-jadeja/'
    
        );
    
        //does nothing if the requested image_id is not a key of the array
        if ( ! array_key_exists( $image_id, $image_links ) )
            return $slide_link;
    
        //else returns the custom link
        return $image_links[$image_id];
    }

    Doesnt work, it is freakin me out.
    Site: https://www.sky-design.nl

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘customizr – linking *multiple* slider images to pages’ is closed to new replies.