Tagged: child theme, external links, woocommerce
Hello,
Hoping you can help :-) I’m trying to figure out how to get the links in the Product List to open in a separate tab. Example in left column: http://www.tripreads.com/istanbul/
I tried a plugin recommended on several sites but it added random characters throughout the description text, so it won’t work: https://wordpress.org/plugins/woocommerce-improved-external-products/
I tried to edit the code in WooCommerce per the following link, but it doesn’t take in the Product List (seems the code needs to be changed in Enfold rather than WooCommerce): http://pointclearmedia.com/2014/11/20/make-woocommerce-external-products-open-new-window/
I believe the changes need to be applied to this file: productslider.php, but doing so exceeds my capabilities :)
I’m using Enfold theme + child theme (installed and active).
Thanks for any assistance.
Hi Jennifer!
Add this to the bottom of your functions.php file.
add_action( 'wp_footer', 'enfold_customization_footer_scripts' );
function enfold_customization_footer_scripts() {
?>
<script type = "text/javascript">
jQuery(document).ready(function(){
jQuery('.av-catalogue-list a').attr('target', '_blank');
});
</script>
<?php
}
Regards,
Elliott
Phenomenal. Thank you!