-
AuthorPosts
-
September 10, 2015 at 11:44 am #500923
Dear support-team,
in the product grid I would like to open the “show details” – link in a new window / tab.
Is this possible?
The other link to the product detail page by clicking at the product box itself I already changed by adding -target”_blank”- in the content-product.php.Many thanks
Lena
September 10, 2015 at 4:55 pm #501163Hi lenalavendel!
Try adding this to the bottom of your functions.php file.
add_action( 'wp_footer', 'enfold_customization_more_scripts' ); function enfold_customization_more_scripts() { ?> <script type = "text/javascript"> jQuery(document).ready(function(){ jQuery('.show_details_button').attr('target', '_blank'); } </script> <?php }Cheers!
ElliottSeptember 10, 2015 at 7:27 pm #501283Hi Elliott,
no, that did not work, although I cleared functions.php of all hooks / filters and disabled other plugins.September 11, 2015 at 7:33 am #501437Hi!
Can you please provide a link to the product page? We would like to check it. Please try to replace the code with this:
// target _top function add_custom_script(){ ?> <script> (function($) { $('.show_details_button').each(function() { $(this).removeAttr('target'); $(this).attr('target', '_blank'); }); })(jQuery); </script> <?php } add_action('wp_footer', 'add_custom_script');Best regards,
IsmaelSeptember 15, 2015 at 9:56 am #503151Hi Ismael,
thanks, I think that worked. At least for the link.
Is it possible that this code could effect the checkout? One Costumer is having trouble with the last step of order.
Sorry for nonprofessional question…September 15, 2015 at 9:57 am #503154The website:
September 15, 2015 at 11:24 am #503203 -
AuthorPosts
- You must be logged in to reply to this topic.
