Support » Plugin: oik-nivo-slider » Using 'oik custom image link URL' only on *certain* slides

Viewing 3 replies - 1 through 3 (of 3 total)
  • No answer on this but, if anyone wants to do this, here’s how I did it hacking the plugin:

    I used the Nivo silder shortcode with link=y

    [nivo link=y]

    Then, to only create a link in the slideshow for slides with an associated URL, I hacked in plugins/oik-nivo-slider/ as follows:

    at line 337 I replaced these lines:

    $permalink = bw_get_image_link( $post->ID );
          alink( null, $permalink , $thumbnail, null );


    $permalink = bw_get_image_link( $post->ID );
          if (strlen($permalink) > 0 ) {
          	alink( null, $permalink , $thumbnail, null );  
          } else {
          	e( $thumbnail );

    To prevent the cursor appearing for slides with no URL, I commented out almost all of plugins/oik-nivo-slider/jquery.oik-nc-click.js:

    jQuery.fn.oikNCClick = function(){
        var slider = $(this);
        var nc = $('.nivo-caption', slider);
        //nc.hover( function() { $(this).addClass( 'nivo-caption-hovered' ); }
          //      , function() { $(this).removeClass( 'nivo-caption-hovered' ); } );
        //nc.css( 'cursor', 'pointer' );
        //'click', function(){
          //var visible = $('a.nivo-imageLink:visible', slider);
          //window.location.href = visible.attr('href');

    Then, to allow external links to open in a new window, I hacked in plugins/oik as follows:

    at line 181, I replaced this line

    $link .= ">";


    // if URL contains, don't open in new window: must replace with your own site's domain
      if (stripos($url, "")) {
      	$link .= " >";
      } else { // it IS external...
      	$link .= " target='_blank'>";
    Plugin Author bobbingwide


    Hi, sorry I didn’t see this sooner. I’m glad you found a solution to your problem.

    There are probably some other solutions that don’t necessitate hacking the code but I don’t have time to investigate them right now.
    When I do, I’ll see whether or not I can incorporate your solutions into the base code.

    Plugin Author bobbingwide


    Hi again, regarding making links inactive. One option would be to set the oik custom image link URL to #

    But when the user clicks on it the page may scroll back to the top.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Using 'oik custom image link URL' only on *certain* slides’ is closed to new replies.