Reputation: 133
I really need help to move the category description to the bottom of the category page between the pagination and the footer?
I have absolutely no idea which file to look for...
Upvotes: 8
Views: 24131
Reputation: 577
add this to the theme functions.php
remove_action( 'woocommerce_archive_description', 'woocommerce_taxonomy_archive_description', 10 );
add_action( 'woocommerce_after_shop_loop', 'woocommerce_taxonomy_archive_description', 100 );
you can also change the layout by adding this function also and change the echo code.
function woocommerce_taxonomy_archive_description() {
if ( is_tax( array( 'product_cat', 'product_tag' ) ) && get_query_var( 'paged' ) == 0 ) {
$description = wpautop( do_shortcode( term_description() ) );
if ( $description ) {
echo '<div class="term-description">' . $description . '</div>';
}
}
}
Upvotes: 24
Reputation: 6541
try <?php echo category_description(); ?>
rather than <?php do_action( 'woocommerce_archive_description' ); ?>
and the 2nd code gives more than just the description.
You will also want to delete the description being outputted by your wootheme that noone except for backups seems to be addressing?
Upvotes: 0
Reputation: 15
<h1 class="page-title"><?php woocommerce_page_title(); ?></h1>
<?php endif; ?>
<?php do_action( 'woocommerce_archive_description' ); ?>
Markus G, In case of pagination 'woocommerce_archive_description' is not work for inner paginated pages.
Upvotes: 0
Reputation: 86
you have to change the archive-product.php in
/wp-content/plugins/woocommerce/templates
find this and paste it before the woocommerce_after_main_content_hook :
<h1 class="page-title"><?php woocommerce_page_title(); ?></h1>
<?php endif; ?>
<?php do_action( 'woocommerce_archive_description' ); ?>
just solved the same problem
Upvotes: 7