-
AuthorPosts
-
September 27, 2022 at 2:16 am #1366477
Hey guys,
In sliders such as Fullwidth Easy Slider there are options to attach a link to the image OR to a button. Would it be possible to add another option to add a link to the image AND to the button?
Thanks
Tim
September 28, 2022 at 9:49 am #1366671Hey Tim,
Thank you for the inquiry.
This is not possible by default but you can just apply the link to the image, then manually create a button in the caption text field either with a shortcode or custom html.
Best regards,
IsmaelOctober 7, 2022 at 4:06 am #1367895Hi Ismael,
Thanks for the reply.
I just tried your suggested approach but I can’t get it to work. As soon as I add in either a shortcode or valid HTML for a button, it only allows the button to be clicked, and not the image as well.
Could you please verify that this approach should work?
Thanks
Tim
October 7, 2022 at 9:36 am #1367926Hi,
Thank you for the update.
Looks like the slider breaks when there is another link or button inside the caption container. It does work but the layout of the slider is no longer correct. Please remove the button or link shortcode from the caption field and activate the slider buttons instead.
And to apply a custom link to the slide, add this span element in the caption field instead.
<span class="av-slider-link hidden" data-link="http://kriesi.at"></span>
We will add the custom slide link in the data-link attribute, then add this code in function.php file to redirect the page to the specified data-link when the slide is clicked.
// apply custom link to the slide image function ava_custom_script_slideshow_link() { ?> <script type="text/javascript"> (function($) { $('.avia-slideshow-slide').on('click', function() { var sliderlink = $(this).find('.av-slider-link'); window.location.href = sliderlink.attr('data-link'); }); })(jQuery); </script> <?php } add_action( 'wp_footer', 'ava_custom_script_slideshow_link', 9999 );
Best regards,
IsmaelOctober 7, 2022 at 11:56 am #1367938Hello,
Please help.
Home page Slider photos are not showingOctober 9, 2022 at 10:45 am #1368097Hi rafaelmontilla,
I see that you are running an old version of the theme, could you try to update to the latest version (5.1.2) to see if that helps please? The update to 5.x has to be done manually from the version you are running, please refer to my replies in this thread: https://kriesi.at/support/topic/enfold-4-5-theme-update-update-failed-download-failed-a-valid-url-was-not-pro/#post-1021541
You can either update manually via FTP: https://kriesi.at/documentation/enfold/how-to-install-enfold-theme/#theme-update, or use a plugin to upload the theme zip file: https://wordpress.org/plugins/update-theme-and-plugins-from-zip-file/
If that doesn’t work then please try to delete the whole theme folder, then replace it with the new version. Make sure that you have backups of the site before starting updating.
Also please read this after you have updated: https://kriesi.at/documentation/enfold/theme-registration/Best regards,
RikardOctober 10, 2022 at 2:00 am #1368183Hi Ismael,
Thanks for the updated suggestion. This one works, but with a catch:
It works fine for any slide that has the span element added as you suggested. However, for ANY slider on the site that doesn’t have that span element added, it returns an “undefined” and points to a URL with /undefined in it, resulting in a 404.
Can you add a check in the code to only run if there is that span element in the slider’s caption field?
Thanks
Tim
- This reply was modified 2 years, 2 months ago by THP Studio.
October 10, 2022 at 3:03 am #1368185Hi Ismael,
My developer was able to fix it, you can close this one now thank you.
Regards
Tim
October 10, 2022 at 6:11 am #1368199Hi Tim,
We are happy to hear that :)
Thanks for using Enfold and have a great day!Best regards,
Nikko -
AuthorPosts
- The topic ‘Small Feature Request’ is closed to new replies.