-
AuthorPosts
-
April 1, 2015 at 2:49 pm #240183
Hi there,
Thanks for writing in!
You cannot add a custom class to your portfolio item, it’s adding dynamically. So, if you wish to open all your portfolio items in a new window? If so, you can use following code under Custom > JavaScript in the Customizer:
(function($){ $('.entry-thumb').attr('target', '_blank'); })(jQuery);
If you wish to target individual portfolio item, you can use their unique classes (see: http://prntscr.com/6oaf3x). So, review our KB article to locate post ids (same procedure for portfolio items): https://theme.co/x/member/kb/how-to-locate-post-ids/
After that, you can use following code instead:
(function($){ $('.post-3570 .entry-thumb').attr('target', '_blank'); })(jQuery);
Replace 3570 with your post/portfolio item ID.
Hope this helps. 🙂
Thank you.
November 4, 2015 at 4:03 am #651928This custom code does not seems to open the link in a new tab:
(function($){ $('.entry-thumb').attr('target', '_blank'); })(jQuery);
Any ideas? It is opening the link on all portfolio items, but not in a new tab..
http://nlfire-hardieres.savviihq.com/merken/
Have a look @ the last item
Thanks
November 4, 2015 at 5:07 am #651996Hi there,
Please remove previous code and add this one :
jQuery(".page-template-template-layout-portfolio-php .entry-featured a").attr("target","_blank");
Hope that helps.
-
AuthorPosts