I actually got this wordpress theme free (from theme kingdoms: widely theme), and they code in such a way that the nivo slider will display the featured image of my post.

All the "Title" on the nivo slider is linked to the post when clicked. But I will want all the "IMG" to be the link instead.

Can anyone please help me!

I suppose the customization will occur in the nivo slider javascript which I pasted here (this is only a part of the .js):


//Find our slider children
var kids = slider.children();
kids.each(function() {
var child = jQuery(this);
var link = '';
if(!child.is('img')){
if(child.is('a')){
child.addClass('nivo-imageLink');
link = child;
}
child = child.find('img:first');
}
//Get img width & height
var childWidth = child.width();
if(childWidth == 0) childWidth = child.attr('width');
var childHeight = child.height();
if(childHeight == 0) childHeight = child.attr('height');
//Resize the slider
if(childWidth > slider.width()){
slider.width(childWidth);
}
if(childHeight > slider.height()){
slider.height(childHeight);
}
if(link != ''){
link.css('display','none');
}
child.css('display','none');
vars.totalSlides++;
});

//Set startSlide
if(settings.startSlide > 0){
if(settings.startSlide >= vars.totalSlides) settings.startSlide = vars.totalSlides - 1;
vars.currentSlide = settings.startSlide;
}

//Get initial image
if(jQuery(kids[vars.currentSlide]).is('img')){
vars.currentImage = jQuery(kids[vars.currentSlide]);
} else {
vars.currentImage = jQuery(kids[vars.currentSlide]).find('img:first');
}

//Show initial link
if(jQuery(kids[vars.currentSlide]).is('a')){
jQuery(kids[vars.currentSlide]).css('display','block');
}

//Set first background
slider.css('background','url("'+ vars.currentImage.attr('src') +'") no-repeat');

//Create caption
slider.append(
jQuery('<div class="nivo-caption"><p></p></div>').css({ display:'none', opacity:settings.captionOpacity, zIndex:999 })
);

// Process caption function
var processCaption = function(settings){
var nivoCaption = jQuery('.nivo-caption', slider);
if(vars.currentImage.attr('title') != '' && vars.currentImage.attr('title') != undefined){
var title = vars.currentImage.attr('title');
var cont = vars.currentImage.attr('rev');
var link = vars.currentImage.attr('link');
title = '<a href="'+link+'">'+title+'</a>';
cont = '<p class="sub">'+cont+'</p>';
if(title.substr(0,1) == '#') title = jQuery(title).html();

if(nivoCaption.css('display') == 'block'){
nivoCaption.fadeOut(settings.animSpeed);
nivoCaption.find('p').fadeOut(settings.animSpeed, function(){
jQuery(this).html(title + cont);
jQuery(this).fadeIn(settings.animSpeed);
nivoCaption.fadeIn(settings.animSpeed);
});
} else {
nivoCaption.find('p').html(title + cont);
}
nivoCaption.fadeIn(settings.animSpeed);
} else {
nivoCaption.fadeOut(settings.animSpeed);
}
}

//Process initial caption
processCaption(settings);
Thanks so much in advance!