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.
:-(
Hey Edeenreich,
Can you please post the link to your page and point out the changes you would like to make? :)
Best regards,
Yigit
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
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
Thank you!
Kornelia
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