Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #728953

    How can I open the headline of a post type “link” in a new window. Setting target of the link in the text into “blank” doesn*t work.
    :-(

    #729015

    Hey Edeenreich,

    Can you please post the link to your page and point out the changes you would like to make? :)

    Best regards,
    Yigit

    #729064

    Hi Yigit,
    the page is not online yet, but I´m talking about the blog overview as you can see here: http://prntscr.com/dr0nrf
    If you click the headline or image of any post type except “link” the single post page ist opening. http://prntscr.com/dr0odb
    Now I want to use the post type “link” for linking to a page out of the website, but don´t want that user leave our website.

    I hope you can help.
    Thanks in advance, Kornelia

    #729326

    Hi,

    Thank you for the info.

    Please add this in the functions.php file.

    add_action('wp_footer', 'ava_custom_script');
    function ava_custom_script(){
    ?>
    <script type="text/javascript">
    (function($) {
    	function a() {
    		$('.slide-entry-title a, .slide-image').each( function() {
    			var site = document.location.host,
    				link = $(this).attr('href');
    
    				if(link.indexOf(site) !== -1) {
    					return;
    				} else {
    					$(this).attr('target', '_blank');
    				}
    		});
        }
    
    	a();
    })(jQuery);
    </script>
    <?php
    }

    Best regards,
    Ismael

    #744776

    Thank you!
    Kornelia

    #744790

    Hi,

    Glad we could help! To know more about enfold features please check – http://kriesi.at/documentation/enfold/
    Thank you for using Enfold :)

    Best regards,
    Vinay

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Open post type "Link" in a new window’ is closed to new replies.