Hi,
right now we are not really planning to change the clickable area in the recent ads widget.
If you would like to have the whole recent item clickable then you would need to open file wpadverts/includes/class-widget-ads.php go to line about 473 and change the line
<div class="<?php echo adverts_css_classes( 'adverts-widget-recent', get_the_ID() ) ?>">
to
<div onclick="location.href='<?php the_permalink() ?>'" style="cursor:pointer" class="<?php echo adverts_css_classes( 'adverts-widget-recent', get_the_ID() ) ?>">
Note that this change will be overwritten on WPAdverts update, so make sure to backup it and redo after WPAdverts update.
If i will find some free time i will try to come up with some code snippet for this which will not be overwritten on the update.
Hello Greg,
Thank you very much for the ultra fast reply.
I’ve tested your code, but I loose all the widget css format.
Do you have another suggestion?
Best regards,
David Duarte
Are you sure you have the code added correctly? It will not remove any CSS formatting as the only thing it does is that it makes the main div clickable and changes the cursor to indicate the div can be clicked.
Greetings Greag,
I copied and pasted the code again, and it is ok now. Maybe sometime was missing…
Thank you very much.
I love your script.
Take care.
David Duarte