• Resolved mavericklp28

    (@mavericklp28)


    How can I use shortcode on brand archive page

    Also in flatsome theme, description is at the top of the brand, is there a way to get it to the bottom?

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Juan Coronel

    (@juaancmendez)

    Hi there,
    we hope you’re doing well!

    In order to achieve what you need, add this code in the functions.php file of your active theme:

    if ( ! function_exists( 'yith_wcbr_move_archive_description' ) ) {
        function yith_wcbr_move_archive_description() {
    		if ( version_compare( WC()->version, '2.7.0', '>=' ) ) {
                remove_action( 'woocommerce_archive_description', 'woocommerce_taxonomy_archive_description' );
            }
            remove_action( 'woocommerce_archive_description', array( YITH_WCBR(), 'add_archive_brand_template' ), 7 );
            add_action( 'woocommerce_after_shop_loop', array( YITH_WCBR(), 'add_archive_brand_template' ), 5 );
        }
        add_action( 'init', 'yith_wcbr_move_archive_description', 999 );
    }

    Try it out and tell us if it works well for you.

    We will be attentive to your response.

    Have a nice day!

    Thread Starter mavericklp28

    (@mavericklp28)

    Nothing changed with this code snippets

    Thread Starter mavericklp28

    (@mavericklp28)

    I just noticed that the description now shows in both top and bottom of page.

    Plugin Support Juan Coronel

    (@juaancmendez)

    Hi there,

    Apparently, the code does not work with Flatsome, although for example in our Proteo theme it works correctly. Try replacing the above code with this:

    if ( ! function_exists( 'yith_wcbr_move_archive_description' ) ) {
    
    	function yith_wcbr_move_archive_description() {
    		$jquery = '
    				jQuery(document).ready(function($) {
    					$( ".yith-wcbr-archive-header.term-description" ).insertAfter( ".shop-container" );
    				});';
    	
    		wp_add_inline_script( 'yith-wcbr', $jquery );
    		wp_add_inline_script( 'yith-wcbr', $jquery );
    	}
       
    	add_action( 'wp_enqueue_scripts', 'yith_wcbr_move_archive_description', 99 );
       
    }

    Let us know any news, please.

    Have a nice day!

    Thread Starter mavericklp28

    (@mavericklp28)

    Thanks a lot, it’s working

    Hello there,

    Perfect, I’m glad my colleague helped you solve the problem he was experiencing. I mark the topic as resolved.

    Have a nice day!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘brand archive page description layout’ is closed to new replies.