- This topic has 10 replies, 6 voices, and was last updated 3 years, 11 months ago by
Leo.
-
AuthorPosts
-
October 12, 2017 at 3:12 pm #402272
Sebastian
Hi Tom and Team,
since I’m using your awesome work more and more and recommend it to friends I came across a small feature I’d like to see in an upcoming release OR just have a little snippet for the functions.php or style.css to move the category text in WooCommerce below the products.
I want to write a little more in my category description and don’t want my products being pushed down to far. Any way you can help me out?
Thank you in any case and best regards.
October 12, 2017 at 10:25 pm #402371Tom
Lead DeveloperLead DeveloperHmm, I wonder if you could do this:
add_action( 'wp', 'tu_move_wc_archive_description' ); function tu_move_wc_archive_description() { if ( is_archive() ) { remove_action( 'woocommerce_archive_description', 'woocommerce_taxonomy_archive_description', 10 ); remove_action( 'woocommerce_archive_description', 'woocommerce_product_archive_description', 10 ); add_action( 'woocommerce_after_main_content', 'woocommerce_taxonomy_archive_description', 10 ); add_action( 'woocommerce_after_main_content', 'woocommerce_product_archive_description', 10 ); } }
October 14, 2017 at 8:02 am #403131Sebastian
Hi Tom,
I implemented it via the Snippets plugin yet to no avail. (already used this plugin with snippets to alter some text on the page)
Neither does the description disappear before the products nor does it appear after them.
Snippet is still active on my site right now.
Any other ideas?
Thanks for any help. πOctober 14, 2017 at 11:25 am #403224Tom
Lead DeveloperLead DeveloperHmm, I’m afraid that was my only idea. You may need to ask WooCommerce support, as they’re more familiar with their hooks etc..
Let me know if they’re not able to help π
October 14, 2017 at 11:37 am #403231Sebastian
Hi Tom,
thank you for your response.
Yes, great idea. I’ll ask them and will share my findings as a reference for other users if it works.
Thank you for your ideas and support.Have a nice weekend.
October 14, 2017 at 11:09 pm #403422Tom
Lead DeveloperLead DeveloperThank you! You too π
July 18, 2018 at 4:48 am #626452Henrique
Hello guys!
Sabastian, did you make it work?
Thanks
HenriqueJuly 18, 2018 at 7:01 am #626555David
StaffCustomer SupportHi Henrique
if you have a site we can look at and explain your exact requirements we can have a look to help. If so please raise a new topic and where you can add a Site URL privately and we can assist.
August 6, 2018 at 12:14 pm #641857Sebastian
Hey Henrique,
yes I solved it. Have a look at one of my categories at my site
Here is the code that made that happen:
add_action('woocommerce_archive_description', 'custom_archive_description', 2 ); function custom_archive_description(){ if( is_product_category() ) : remove_action('woocommerce_archive_description', 'woocommerce_taxonomy_archive_description', 10 ); add_action( 'woocommerce_after_main_content', 'woocommerce_taxonomy_archive_description', 5 ); endif; }
Now as you can see at the moment the description at the bottom is very short, but I will write a longer one.
At the top of the page I used a page header (in the future: Page Hero Element) and under LAYOUT – WOOCOMMERCE I disabled the breadcrumbs and page title.December 24, 2019 at 11:39 am #1113487Alvaro
Exactly what I was looking for
Couul you please add some screenshots of how you have implemented it (and where)
I have created a hook and pasted it but is not working so I might not be doing it right. But I have no ide about writting codeDecember 24, 2019 at 11:49 am #1113490Leo
StaffCustomer SupportTry one of these methods here:
https://docs.generatepress.com/article/adding-php/ -
AuthorPosts
- You must be logged in to reply to this topic.