• Resolved pedradaaaa

    (@pedradaaaa)


    Hi,

    In the store tabs, what can I do display the content I want when the store is open rather then the content of the products tab? Like, imagine I want the first content to appear is the about tab.

    How can I do this?

    Thanks for your time

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter pedradaaaa

    (@pedradaaaa)

    Please can you give me a answer?

    Thanks

    Plugin Author WC Lovers

    (@wclovers)

    It’s possible to manipulate store tabs. Also possible to add new tabs.

    Here is a sample code to merge “About” and “Policy” tabs with Products tab –

    add_filter( 'wcfmmp_store_tabs', function( $store_tabs, $store_id ) {
    	if( isset( $store_tabs['about'] ) ) unset( $store_tabs['about'] );
    	if( isset( $store_tabs['policies'] ) ) unset( $store_tabs['policies'] );
    	return $store_tabs;
    }, 50, 2 );
    add_action( 'wcfmmp_before_store_product', function( $store_id, $store_info ) {
    	$store_user   = wcfmmp_get_store( $store_id );
    	$wcfm_shop_description = apply_filters( 'wcfmmp_store_about', apply_filters( 'woocommerce_short_description', $store_user->get_shop_description() ), $store_user->get_shop_description() );
    	if( $wcfm_shop_description ) { ?>
    		<div class="wcfm-store-about">
    			<div class="wcfm_store_description" ><?php echo $wcfm_shop_description; ?></div>
    		</div>
    	<?php }
    	
    	echo do_shortcode( '[wcfm_policy]' );
    }, 50, 2 );

    Add custom code(s) to your child theme’s functions.php
    In case you do not have child theme then add those using this plugin –?https://www.ads-software.com/plugins/code-snippets/

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Store tabs’ is closed to new replies.