Tagged: H1, woocommerce
-
AuthorPosts
-
September 28, 2020 at 12:06 pm #1248965
Hello,
we have some problems with the full-width product/woocommerce category banner:The goal is to show the category title as h1 within the banner and the category description below the banner and above the product-loop.
It shows the product category description as h1 (which is a seo issue)… the reason for this ist in line 1096 of the config-php:
1094 $output .='<div class=”container”>’;
1095 $output .='<main class=”template-page content av-content-full alpha units”>’;
1096 if($description) $output .= “<h1>”.$description.”</h1>”;
1097 $output .='</main></div></div></div>’;
I tried to change this into $title but did I wrong enventually… It would be a bad solution anyway because the config.php seems noch to support child-themes files so that we have to change the main theme file after every update.
It seems like the fullwidth-banner-function ist preventing the description text below the banner too and I cant add ist via add action in the functions.php at this position.Need help – Thank you in advance
October 1, 2020 at 5:40 am #1249795Hey marcfrey,
Thank you for the inquiry.
We could disable the default avia_woocommerce_big_cat_banner function, copy the whole function to the child theme and rename it a bit, my_avia_woocommerce_big_cat_banner_mod for example, so that we do not cause any duplicate function errors. We can then do our own modifications for that function and to the avia_woocommerce_parallax_banner function which renders the parallax and the description. Again, we have to copy the avia_woocommerce_parallax_banner function to the child theme and rename it to avoid creating a script error.
Use this snippet in the functions.php file to disable the avia_woocommerce_big_cat_banner hook.
remove_action( 'ava_after_main_container', 'avia_woocommerce_shop_banner', 11 );
To hook the modified function back after doing the modifications, we could add this snippet.
add_action( 'ava_after_main_container', 'my_avia_woocommerce_shop_banner_mod', 11 );
Best regards,
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.