Hello,
There seems to be an error with the Enfold Theme and the “Custom Product Tabs for WooCommerce” Plugin. There is too much space around the tab elements – it wasn’t always like that, but it seems one of the updates to Enfold caused the problem.
I have included the link to one of the pages in question as well as the login to the site.
Hey vantagepointmg,
Thank you for the inquiry.
For some reason, a lot of whitespaces are added around the tab title. We can remove those whitespaces by using this script in the functions.php file.
function ava_trim_tab_title_whitespaces(){
?>
<script>
(function($) {
$("#top div div.product .woocommerce-tabs ul.tabs li a").each( function() {
var title = $(this).text();
var trimmed = $.trim(title);
$(this).html(trimmed);
});
}
)(jQuery);
</script>
<?php
}
add_action('wp_footer', 'ava_trim_tab_title_whitespaces');
Best regards,
Ismael
Hello Ismael,
Thanks for the reply back, however it seems that the code has some errors. When I added it to the PHP files, the website came back with this error:
502
The page request was canceled because it took too long to complete
What can I do?
Site visitors: There was an issue serving your request, please try again in a few minutes.
Site Owners: A request for either a page, script, process, or query has taken too long to complete and has been cancelled due to a bad gateway. You should visit your error log for more information.
Please advise.
Hi,
Thank you for the update.
The code works fine on our end, no errors. Did you copy the snippet from your email? Please try to copy it directly from this forum instead.
We also noticed that the site contains a very old version of the theme, v4.4.1. You have to upgrade the theme to latest version (v4.8.1) first.
Best regards,
Ismael
That worked! Thank you so much :)