Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #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

    #1366671

    Hey 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,
    Ismael

    #1367895

    Hi 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

    #1367926

    Hi,

    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,
    Ismael

    #1367938

    Hello,
    Please help.
    Home page Slider photos are not showing

    #1368097

    Hi 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,
    Rikard

    #1368183

    Hi 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.
    #1368185

    Hi Ismael,

    My developer was able to fix it, you can close this one now thank you.

    Regards

    Tim

    #1368199

    Hi Tim,

    We are happy to hear that :)
    Thanks for using Enfold and have a great day!

    Best regards,
    Nikko

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Small Feature Request’ is closed to new replies.