- This topic has 7 replies, 4 voices, and was last updated 1 year, 11 months ago by Ying.
-
AuthorPosts
-
May 22, 2022 at 5:40 pm #2228940Cristiano
Hello, I used the code provided by Ton in this thread:
https://generatepress.com/forums/topic/moving-the-category-description-to-the-bottom/#post-949883That worked for me. But, I’m just experiencing a little issue with the author archive page. The description occurs twice on this page.
Is it possible that this code will not function on this page? thank you for your attentionI sent the examples to the restricted area.
Thanks
May 22, 2022 at 8:09 pm #2228995Fernando Customer SupportHi Cristiano,
To clarify, how are you adding this section? https://share.getcloudapp.com/yAu1XRq8
If you’re adding it through a Block Element, Can you try removing the description from that Block Element.
Kindly let us know how it goes. 🙂
May 23, 2022 at 6:49 am #2229491CristianoHello fernando,
I created a block element to customize the author archives page with information extracted from the author’s meta and I also created another block element with the author box to position single post pages after the articles.
My question is whether the snippet that was provided could work Moving the category description to the bottom, on the category’s archive pages, except on the author archives page.
I would like the author archives page to keep working in the default wordpress template and without duplicating the meta info.
Thanks!
May 23, 2022 at 8:26 am #2229765DavidStaffCustomer SupportHi there,
on your Author Archive you have a Block Element ( in Appearance > Elements ) which is adding the content at the top of the archive.
May 26, 2022 at 7:03 am #2233398CristianoYes, I have a Block Element in Author Archive, so I need your help modify the function provided here on the forum
add_action( 'wp', function() { remove_action( 'generate_after_archive_title', 'generate_do_archive_description' ); if ( is_archive() ) { add_action( 'generate_after_main_content', 'generate_do_archive_description' ); } } );
I need a conditional function to keep moving the category description to the bottom. This is OK!
But that doesn’t work on the author archive page.
May 26, 2022 at 10:16 am #2233843YingStaffCustomer SupportTo be clear, you want to remove the default description from author archive page?
If so, try this:
add_action( 'wp', function() { remove_action( 'generate_after_archive_title', 'generate_do_archive_description' ); if ( is_archive() && !is_author() ) { add_action( 'generate_after_main_content', 'generate_do_archive_description' ); } } );
May 26, 2022 at 10:26 am #2233862CristianoIt worked! Thank you really much!!
May 26, 2022 at 11:19 am #2233949YingStaffCustomer SupportNo problem 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.