Tagged: blank, custom link, new tab, Portfolio
-
AuthorPosts
-
April 17, 2018 at 6:08 pm #943189
I’m using the portfolio items as a news grid that links to another sites news items. At present when you change the link in the portfolio item to a custom one the item configures to the same page which makes the site dissapear. I need the links to open in another page.
you can see what i mean by viewing the big 3 news blocks made with the portfolio on the page link provided.
April 17, 2018 at 6:13 pm #943192This reply has been marked as private.April 17, 2018 at 6:58 pm #943212Hi,
:
When you set the link can you add the attribute:target="_blank"
Best regards,
Jordan ShannonApril 19, 2018 at 4:36 pm #944161ive tried adding that to the end, it doesnt work?
just to make sure you understand where im talking about, see screenshot link.
April 23, 2018 at 3:06 am #945179Hi,
Are you using the Portfolio Grid element? Please remove the target attribute in the url field. Edit the page with the portfolio and then add this script in a code block.
<script type = "text/javascript"> (function($){ $(window).on('load', function() { $('.grid-entry a').attr('target', '_blank'); }); })(jQuery); </script>
Best regards,
IsmaelApril 23, 2018 at 10:26 am #945336Hi thanks – yes using the portfolio grid and items – ive placed that code in a code block (the type in the pagebuilder) and deleted the target att. see screenshot links,
sorry but still not giving me a new tab / blank page on front end?
April 24, 2018 at 9:50 am #945782Hi,
Thank you for the update.
The same code works on our installation. Please provide the WP login details in the private field. We would like to test it.
Best regards,
IsmaelApril 26, 2018 at 6:01 pm #947375hi sorry for delay. its seems to be working as it should now, has someone done something? we havent changed anything, your code is not even placed…?!? :)
April 26, 2018 at 6:33 pm #947390Hi,
The code should be placed, however this could have been addressed via an update.
Best regards,
Jordan ShannonApril 30, 2018 at 1:13 pm #949055really sorry but that last post was meant to go on my other ticket about the header i have (its ok now!) – this issue however is still outstanding! :)
can you have a look into the site and let me know if there is a solution please?
May 2, 2018 at 11:22 am #949969Hi,
We have added this script in the functions.php file.
// custom script add_action( 'wp_footer', 'ava_custom_script' ); function ava_custom_script() { ?> <script type="text/javascript"> (function($) { $(document).ready( function() { $('.grid-entry a').attr('target', '_blank'); }); })(jQuery); </script> <?php }
Best regards,
IsmaelMay 4, 2018 at 12:25 pm #951588Brilliant thankyou so much!
May 4, 2018 at 10:31 pm #951946Hi,
Glad we could help!
Please take a moment to review our theme and show your support https://themeforest.net/downloads
To know more about enfold features please check – http://kriesi.at/documentation/enfold/
Thank you for using Enfold :)Best regards,
Basilis -
AuthorPosts
- The topic ‘How to make a porfolio item thats set with a custom link open in a new tab’ is closed to new replies.