Last active
November 20, 2023 15:01
-
-
Save codersaiful/380022091f97551c707cc553c55064ea to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
/** | |
* Add the following code in your functions.php or any plugin. | |
*/ | |
if (!function_exists('wpt_remove_taxonomy_link')) { | |
function wpt_remove_taxonomy_link() | |
{ | |
?> | |
<script> | |
jQuery(document).ready(function ($) { | |
// Updated by Ibrahim Khalil | |
$('[data-keyword="pa_brand"] a').contents().unwrap(); | |
$(document).on('your_custom_event', '[data-keyword="pa_brand"]', function () { | |
$('[data-keyword="pa_brand"] a').contents().unwrap(); | |
}); | |
$(document).on('change', 'table', function () { | |
$('[data-keyword="pa_brand"]').trigger('your_custom_event'); | |
}); | |
}); | |
</script> | |
<?php | |
} | |
add_action('wp_footer', 'wpt_remove_taxonomy_link'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment