Hi Peter,
thank you for using Easy SwipeBox and don’t worry about Github, it’s no t an issue.
Right now it’s not possible to exclude a single image from the autodetection.
I suggest to disable the autodetection for all images media type (Settings -> Easy SwipeBox), so you can add yourself the class="swipebox" and pick the images you like.
I hope this solution is helpful for you.
Leonardo
Hi Leonardo,
Sorry for the late reply and thank you for your reply!
The past days I was looking for a solution and I think I found one. Now I can disable Swipebox on a single image by giving the <a> element the class “noswipebox”.
I did it with this (jQuery) script:
$(document).ready(function(){
$(".noswipebox").removeClass("swipebox");
});
It only works when I enqueue the script after the scripts of your plugin, like this:
function my_scripts() {
wp_register_script( 'my-custom-scripts', get_stylesheet_directory_uri() . '/js/custom-scripts.js', array('jquery-autodetect-swipebox-image'), '1.0.0', true );
wp_enqueue_script( 'my-custom-scripts' );
}
add_action( 'wp_enqueue_scripts', 'my_scripts' );
Maybe you will add this function to your plugin or otherwise I hope it’s useful to someone else.
Hi Peter,
thank you for sharing your solution.
You make me think to add this feature in the next versions, even if I would like to keep this plugin as simple as possible…
I will keep you up to date on this issue.
Thank you!
Leonardo