Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #360153

    Hi,
    Currently an advertising widget ove a link in another window.
    How to get a link on the same window with “Enfold child Averitsing Area” (or cancel the target = “_ blank”)?
    Thank you.

    #360521

    Hi bicounet!

    Thank you for using Enfold.

    You can add this on functions.php:

    /**
     * Remove target attribute
     */
    
    add_filter('wp_footer', 'avf_remove_target', 10);
    function avf_remove_target() { ?>
    <script>
    (function($){
        $(window).load(function() {
        	$( ".avia_partner_widget a" ).each(function() {
    			$(this).removeAttr('target');  
    		});
        });
    	
    })(jQuery);
    </script>
    <?php
    }

    Remove browser cache then reload the page.

    Cheers!
    Ismael

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.