Last active
July 16, 2023 04:22
-
-
Save mdibrahimk48/a23aac1966659e4e8143242268d10be4 to your computer and use it in GitHub Desktop.
The single product page will not opens a new page (by clicking on the thumbnails) every time with this JQuery snippet code for - WPT Plugin by CodeAstrology Team
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function codeastrology_product_table_thumbnails_target_link_change() | |
{ | |
?> | |
<script> | |
jQuery(document).ready(function() { | |
'Code by Ibrahim'; | |
$('a[href="https://funcolorous.co.za/product/tiles/"]').each(function() { | |
$(this).attr('target', '_self'); | |
}); | |
}); | |
</script> | |
<?php | |
} | |
add_action('wp_footer', 'codeastrology_product_table_thumbnails_target_link_change'); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment