Add extra section on vendor store page or show about info above product listings

Multi Vendor Marketplace Plugin | WCFM Marketplace Forums WC Marketplace Add extra section on vendor store page or show about info above product listings

This topic contains 1 reply, has 2 voices, and was last updated by WCFM Forum WCFM Forum 2 weeks, 3 days ago.

  • Author
    Posts
  • #102135
    Avatar
    Sarah
    Participant

    Is it possible to add extra sections on the vendor store page? I would like to show the About Text prominently for each store above the Tabs rather than have a tab for it?

    Also, is it possible to add a field for website under the email address of each vendor on the vendor store pages? Thank you.

  • #106042
    WCFM Forum
    WCFM Forum
    Keymaster

    Hi,

    Please add this code to your site for the purpose-

    add_filter( 'wcfmmp_store_tabs', function( $store_tabs, $store_id ) {
    	if( isset( $store_tabs['about'] ) ) unset( $store_tabs['about'] );
    	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 }
    }, 50, 2 );

    Add this code to your child theme’s functions.php
    In case you do not have child theme then add code using this plugin –¬†https://wordpress.org/plugins/code-snippets/

    Thank You

You must be logged in to reply to this topic.