Archived topic
Shop Description to match Blog Category Description
8 replies · Started by Paul on July 28, 2018
Hello Tom,
I was wondering how to display shop category descriptions in the same way blog category descriptions are displayed? It seems logical to have consistent layout for both shop categories and blog categories throughout the site.
I also can't seem to add a Page Header to the WooCommerce Shop Page.
Any assistance/clarification on the above would be greatly appreciated.
Cheers,
Paul
Hi Paul, any chance you can unlock the site so one of us can have a look?
password is: magic
many thanks, really appreciate it
So to have the Shop archive description in a separate container?
Yes, exactly
And maybe to have a shop description in a separate container.
Hi there, give this a shot, it should match the blog archive entry header
add_action( 'generate_before_main_content', 'db_woo_archive_entry_header');
function db_woo_archive_entry_header() {
if ( is_product_category() ) {
add_filter( 'woocommerce_show_page_title', '__return_false' );
remove_action( 'woocommerce_archive_description', 'woocommerce_taxonomy_archive_description', 10 );
$term_object = get_queried_object();
?>
<div class="woocommerce-category-description">
<div class="inside-article">
<h1 class="title"><?php echo $term_object->name; ?></h1>
<div class="description"><?php echo $term_object->description; ?></div></div>
</div>
</div>
<?php
}
}
Perfect. Thanks bro, works a charm.
You're welcome