If you click on a tag in the tag cloud or in the product description, you will be taken to the page associated with the tag. Here, too, the description can be found above the products. Here too, the visitor can only see my products if he scrolls down. Here too, I would like the description to be after the products. The description cannot be shorter due to SEO. Can it be solved with css code snippets? Thank you for your kind help!
The page I need help with: [log in to see the link]
I have a similar problem with the tags applied to the products in my WordPress woocommerce web store: If you click on a tag in the tag cloud or in the product description, you will be taken to the page associated with the tag. Here, too, the description can be found above the products. Here too, the visitor can only see my products if he scrolls down. Here too, I would like the description to be after the products. The description cannot be shorter due to SEO. Can it be solved with css code snippets?
From what I understand, you’re trying to reposition the tag descriptions on your WordPress WooCommerce web store. You want them to show up after the products, not before, and you’re curious if CSS code snippets can do the trick.
Let’s solve this! You can actually move both the tag and category descriptions below the products using a PHP code snippet. Here’s the code you’ll need:
add_action('woocommerce_archive_description', 'custom_archive_description', 2);
function custom_archive_description(){
if ( is_product_category() || is_product_tag()){
remove_action('woocommerce_archive_description', 'woocommerce_taxonomy_archive_description', 10 );
add_action('woocommerce_after_main_content', 'woocommerce_taxonomy_archive_description', 5 );
}
}
You should add this code to your child theme’s functions.php file or via a plugin that allows custom functions to be added, like the Code Snippets plugin. Please note that it’s not advisable to add custom code directly to your parent theme’s functions.php file. Doing so could lead to the code being erased when the theme is updated.
?? Just a quick reminder: Before you make any changes, we strongly recommend that you create a backup of your full site and database. This is a crucial step to ensure that in case anything goes wrong, you can easily restore your site to its previous, functioning state.
I hope this helps! If you need more assistance or have other questions, don’t hesitate to ask.
I’m thrilled to hear that the solution worked perfectly for you! That’s exactly what we aim for here at WooCommerce support.
I’ll go ahead and mark this thread as resolved. However, if you ever have more questions or issues in the future, don’t hesitate to kick off a new topic.