Moving the archive description section below the content
-
Hello everyone, I’m trying to move the category description section on the blog archive page down so that it appears after the content on the same page. I tried handling this in my function file in my child theme without interfering with the parent theme. However, I was not successful. Inspired by this code;
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 ); } }
I wrote such code.
add_action('astra_archive_page_info', 'custom_archive_page_info', 2); function custom_archive_page_info(){ if ( is_category() ){ remove_action('astra_archive_page_info', 'astra_archive_page_info_callback', 10 ); add_action('astra_primary_content_bottom', 'astra_archive_page_info_callback', 5 ); } }
But it didn’t work. I put the 1st code as an example. It does her job pretty well. But the subject is not woocommerce, but what I want to do on the blog page. My goal is to show the section with the class ast-archive-description at the bottom of the page, not at the top.How can I make the code work?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Moving the archive description section below the content’ is closed to new replies.