This topic has 5 replies, 2 voices, and was last updated 3 years, 1 months ago ago by Julien
Hi,
I want to show the category title before the list grid at to top of the page but near the sidebar
And i want to keep the breadcrumb too
How can i do this ??
(show my example screenshot wanted result )
https://prnt.sc/1ttg3da
Thank you
Hello,
You can use category description to add the necessary content in that area (title in your case). So, go to Theme Options > WooCommerce > Shop > Shop page layout > Shop Page Banner Position > choose at the top of the page. After that go to Products > Categories > edit product category and add the title to the product category description field.
Regards
Yes I saw this solution but it’s not okay. We have 300 categories, we have to do it one by one, it’s not the best.
We cannot insert it in the code just before the description ? if so on which file on which line i can do this. Thank you
Hello,
You can use WooCommerce hooks to add titles by additional customization. For example, add the below code to child theme functions.php
add_action('woocommerce_archive_description', 'category_title_custom');
function category_title_custom() {
//show category title
$term_object = get_queried_object();
?>
<div class="woocommerce-category-description">
<div class="title"><?php echo $term_object->name; ?></div>
</div>
<?php
}
Regards
Merci ! ça fonctionne
The issue related to '‘Show category Title before list grid in category page’' has been successfully resolved, and the topic is now closed for further responses