Skip to content

Instantly share code, notes, and snippets.

View frosso's full-sized avatar
:shipit:
a git pull a day keeps the conflicts away

Francesco frosso

:shipit:
a git pull a day keeps the conflicts away
View GitHub Profile
@frosso
frosso / functions.php
Created January 28, 2021 22:47
[PHP/WordPress/WooCommerce] Display category description on pagination
<?php
// the `woocommerce_taxonomy_archive_description` and the `woocommerce_product_archive_description` functions do not display the category's description on pagination
// this code removes them from WooCommerce and rewrites them to show the description also on new pages
// Before: page 1 (https://d.pr/i/E2iHoD) & page 2 (https://d.pr/i/RiiCOy)
// After: page 1 (https://d.pr/i/E2iHoD) & page 2 (https://d.pr/i/DyGEVQ)
remove_action( 'woocommerce_archive_description', 'woocommerce_taxonomy_archive_description', 10 );
remove_action( 'woocommerce_archive_description', 'woocommerce_product_archive_description', 10 );