richardwilde90
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Why do Pages randomly break because of the permalinks?So, i’m using Rank Math plugin (which is like YOAST Seo)
Let say if RankMath plugin causes the problem, do i need to stop using this altogether. Or would uninstalling it and reinstalling it fix the issue?
Thanks.
Forum: Fixing WordPress
In reply to: I’m trying to edit thank you page by overwriting template filesthanks
This is the final working solution.
I put it in the single-product.php file. however, it works in other javascript files.
<script type="text/javascript"> jQuery('document').ready(function () { jQuery(".woocommerce-tabs li a").off("click"); jQuery(".woocommerce-tabs li a").click(function(e){ e.preventDefault(); jQuery(".woocommerce-tabs li").removeClass("active"); jQuery(this).parent().addClass("active"); jQuery(".woocommerce-Tabs-panel:visible").hide(); jQuery(".woocommerce-Tabs-panel:visible").hide(); jQuery(jQuery(this).attr("href")).show(); return false;}) }); </script>
- This reply was modified 4 years, 1 month ago by bcworkz. Reason: code fixed
do you mean like this?
jQuery( document ).ready(
jQuery(“.woocommerce-tabs li a”).off(“click”);
jQuery(“.woocommerce-tabs li a”).click(function(e){
e.preventDefault();
jQuery(“.woocommerce-tabs li”).removeClass(“active”);
jQuery(this).parent().addClass(“active”);
jQuery(“.woocommerce-Tabs-panel:visible”).hide();
jQuery(“.woocommerce-Tabs-panel:visible”).hide();
jQuery(jQuery(this).attr(“href”)).show();
return false;}))
I found my themes customscript.js. However, this did not work when entered thjs code.
What other options do i have please?
This works perfectly in console.
However, i am not sure where to put this code into my theme files.
I tried putting it into functions.php but i didn’t work I am not sure if its need deferring.
where would the best place for this code to sit?
jQuery(“.woocommerce-tabs li a”).off(“click”);
jQuery(“.woocommerce-tabs li a”).click(function(e){
e.preventDefault();
jQuery(“.woocommerce-tabs li”).removeClass(“active”);
jQuery(this).parent().addClass(“active”);
jQuery(“.woocommerce-Tabs-panel:visible”).hide();
jQuery(“.woocommerce-Tabs-panel:visible”).hide();
jQuery(jQuery(this).attr(“href”)).show();
return false;})