Tagged: ,

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #728759

    I’m using the Content Element “Icon” in ALB and there is an option to assign a link to the font icon. But if you add a caption, there is no method to make that caption be linked to the same URL as the font icon. Any ideas how I could do this?

    Thank you!

    #728852

    Hey newpappa,

    Thank you for using Enfold.

    Please add this code in the functions.php file.

    add_action('wp_footer', 'ava_custom_script');
    function ava_custom_script(){
    ?>
    <script type="text/javascript">
    (function($) {
    	function a() {
    		$('.av_icon_caption').on('click', function() {
    			var link = $(this).prev('a').attr('href');
    			window.location.href = link;
    		})
        }
    
    	a();
    })(jQuery);
    </script>
    <?php
    }

    And this code in the Quick CSS field.

    .av_icon_caption {
        cursor: pointer;
    }

    Best regards,
    Ismael

    #729092

    Beautiful! Thank you so much!

    #729127

    Hi,

    Glad we could help!
    We really appreciate it if you rate our theme on themeforest https://themeforest.net/downloads
    To know more about enfold features please check – http://kriesi.at/documentation/enfold/
    Thank you for using Enfold :)

    Best regards,
    Vinay

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘How to make font icon captions link (to same URL as font icons)’ is closed to new replies.