Request Custom Tabs Manager in Vendor Store Page ?

We are badly hit by super cyclone Amphan. Our response will get delayed!

Multi Vendor Marketplace Plugin | WCFM Marketplace Forums WCFM – Feature Request Request Custom Tabs Manager in Vendor Store Page ?

This topic contains 49 replies, has 10 voices, and was last updated by Avatar Sarmistha Chakraborty 1 day, 21 hours ago.

  • Author
    Posts
  • #76346
    Avatar
    rockprince7
    Participant

    Hi,

    Does WCFM marketplace Free or Ultimate have custom tab manager ?

    If not can you add this feature to allow vendors to display custom content like blog posts, links and other media. Admin can control which file types are allowed ofcourse ?

    2. I would also like to put contact forms or order forms made with gravity form, wpforms or Elementor forms on custom tabs by shortcode so I can style it how I want. Obviously {vendor_user_email } must receive these messages from contact forms.

    Is this possible ?

    Thanks

  • #76374
    WCFM Forum
    WCFM Forum
    Keymaster

    Hi,

    Well NO, store page tab manager is yet there!

    Single Product page tab manager supported by this addon – https://woocommerce.com/products/woocommerce-tab-manager/

    Thank You

  • #76383
    Avatar
    rockprince7
    Participant

    Hi,
    Well NO, store page tab manager is yet there! ?

    No, not the woocommerce product page, I mean WCFM vewndor store page nav bar [ products /about/ reviews section ?

  • #76384
    Avatar
    rockprince7
    Participant

    Does WCFM marketplace Free or Ultimate have custom tab manager ??

  • #77314
    WCFM Forum
    WCFM Forum
    Keymaster

    HI,

    There is no plugin for add new section under store page. it’s only possibly using custom coding.

    It’s same as you have tried to add “Article Tab”.

    Thank You

  • #97405
    Avatar
    snowfreakz
    Participant

    Hi Rockprince,

    Do you have a solution to add a custom tab? I want to show the Posts created by the vendor.

    Jasper

  • #98884
    WCFM Forum
    WCFM Forum
    Keymaster

    Yeah sure, please know me which theme you are using for the site?

  • #98932
    Avatar
    snowfreakz
    Participant

    Hi,

    Does that matter? 🙂 I am using Flatsome as main wordpress theme and for WCfM the one installed by default (dont’t think there are others?)

    Jasper

  • #99694
    WCFM Forum
    WCFM Forum
    Keymaster

    Off course this matters as every theme’s “Article/post” archive template is different.

  • #99938
    Avatar
    snowfreakz
    Participant

    Ah, i see what you mean 🙂

  • #102488
    Avatar
    tahitibora1
    Participant

    Hi guys ,

    I also require custom tabs for vendors, I am using the Astra pro theme.

    On another point could you add your own wclovers feature for custom tabs for woocommerce product pages please

  • #106057
    WCFM Forum
    WCFM Forum
    Keymaster

    Hi,

    Add this code for “Astra” theme –

    add_action( 'wcfmmp_after_store_article_loop_start', function( $store_id, $store_info ) {
    	astra_primary_content_top();
    	echo '<div class="ast-row">';
    }, 50, 2);
    
    add_action( 'wcfmmp_store_article_template', function() {
    	get_template_part( 'template-parts/content-blog' );
    });
    
    add_action( 'wcfmmp_store_article_template_none', function() {
    	get_template_part( 'template-parts/content-none' );
    });
    
    add_action( 'wcfmmp_before_store_article_loop_end', function( $store_id, $store_info ) {
    	astra_pagination();
    	echo '</div>';
    	astra_primary_content_bottom();
    }, 50, 2);
    
    add_filter( 'wcfm_is_allow_store_articles', '__return_true' );

    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

  • #114321
    Avatar
    philipp
    Participant

    How can I sort the Tabs in Vendors Shop Site? I Want the about tab before the products tab

  • #114514
    Avatar
    tahitibora1
    Participant

    Hi guys ,

    thank you for the code.

    i’m using Astra and they use hooks to inject custom code etc…
    https://wpastra.com/docs/custom-layout-hooks/

    here is their example for adding google analytics: https://wpastra.com/docs/how-to-add-google-analytics-code-with-custom-layouts-module/

    please advise?

    thanks for all your help as always great support

  • #115247
    WCFM Forum
    WCFM Forum
    Keymaster

    Hi,

    here is their example for adding google analytics: https://wpastra.com/docs/how-to-add-google-analytics-code-with-custom-layouts-module/

    – For what purpose you are sharing this with us?

    Thank You

    • #117249
      Avatar
      tahitibora1
      Participant
      This reply has been marked as private.
      • #118359
        WCFM Forum
        WCFM Forum
        Keymaster

        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/

  • #117023
    Avatar
    philipp
    Participant

    Hello,

    can you give me custom code for rehab or Envo theme?

  • #118357
    WCFM Forum
    WCFM Forum
    Keymaster

    Sure, here is Article tab code for ReHUB theme –

    add_action( 'wcfmmp_before_store_article', function( $store_id, $store_info ) {
    	?>
    	<div class="main-side no_bg_wrap clearfix<?php if (rehub_option('blog_archive_layout') == 'gridfull_blog') : ?> full_width<?php endif ;?>">
    	<div>
    	<?php
    }, 50, 2);
    
    add_action( 'wcfmmp_store_article_template', function() {
    	?>
    	<?php if (rehub_option('rehub_framework_archive_layout') == 'blog') : ?>
    			<?php include(rh_locate_template('inc/parts/query_type2.php')); ?>
    	<?php elseif (rehub_option('rehub_framework_archive_layout') == 'news_list') : ?>
    			<?php $type='2'; ?>
    			<?php include(rh_locate_template('inc/parts/query_type1.php')); ?>
    	<?php elseif (rehub_option('rehub_framework_archive_layout') == 'community_list') : ?>
    			<?php include(rh_locate_template('inc/parts/query_type1.php')); ?>                    
    	<?php elseif (rehub_option('rehub_framework_archive_layout') == 'grid' || rehub_option('rehub_framework_archive_layout') == 'gridfull') : ?>
    			<?php include(rh_locate_template('inc/parts/query_type3.php')); ?>   
    	<?php elseif (rehub_option('rehub_framework_archive_layout') == 'column_grid' || rehub_option('rehub_framework_archive_layout') == 'column_grid_full') : ?>
    			<?php include(rh_locate_template('inc/parts/column_grid.php')); ?>                   
    	<?php else : ?>
    			<?php $type='2'; ?>                     
    			<?php include(rh_locate_template('inc/parts/query_type1.php')); ?>  
    	<?php endif ;?>
    	<?php
    });
    
    add_action( 'wcfmmp_store_article_template_none', function() {
    	?>
    	<h5><?php _e('Sorry. No articles yet!', 'rehub_framework'); ?></h5>
    	<?php
    });
    
    add_action( 'wcfmmp_after_store_article', function( $store_id, $store_info ) {
    	?>
      </div><div class="clearfix"></div>
      <?php
    	rehub_pagination();
    	echo '</div>';
    }, 50, 2);
    
    add_filter( 'wcfm_is_allow_store_articles', '__return_true' );

    Thank You

  • #126243
    Avatar
    crzy4prple
    Participant

    What would be the code for the layers theme?

    • #126366

      Hello,

      Add this code for layers theme(https://wordpress.org/themes/layers/),

      add_action( 'wcfmmp_store_article_template', function() {
      	?>
      	<div id="" <?php post_class( 'xfolkentry hentry' ); ?>>
          
          <h2><a href="<?php the_permalink() ?>" class="taggedlink entry-title" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
          <div class="date"><abbr class="published updated" title="<?php the_time('Y-m-d\TH:i:s\Z'); ?>"><?php the_time('F jS, Y') ?></abbr></div>
          <span class="vcard author">by<span class="fn"> <?php the_author() ?></span></span>
              <div class="description entry-content">
              <?php the_content('Read the rest of this entry &raquo;'); ?>
      <?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
              </div><!-- End description -->
              <p class="details"><?php the_tags('Tags: ', ', ', '<br />'); ?>Posted in <?php the_category(', ') ?> | <a href="<?php comments_link(); ?>">Comments (<?php comments_number('0','1','%'); ?>)</a><?php edit_post_link('Edit', ' | ', ''); ?></p>
      
          </div>
          <?php
      });
      
      add_action( 'wcfmmp_store_article_template_none', function() {
      	?>
      	<h1>Not Found</h1>
      		<p>We respect your curiosity! But, what you are looking is not present here. Don't be disappointed, keep the spirit high, keep learning, keep finding! Curiosity is good, first step towards innovation.</p>
      	<?php
      });
      
      add_action( 'wcfmmp_before_store_article_loop_end', function( $store_id, $store_info ) { ?>
      	<div class="float-left"><?php next_posts_link('&laquo; Older Entries') ?></div>
      <div class="float-right"><?php previous_posts_link('Newer Entries &raquo;') ?></div>
      <?php
      	echo '</div>';
      	
      }, 50, 2);
      
      add_filter( 'wcfm_is_allow_store_articles', '__return_true' );

      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/

      Thanks.

  • #130620
    Avatar
    DDNaviagtor
    Participant

    Hi,

    what please is the code for the rigid theme?

    Thanks

    • #130890

      Hello,

      Try this –

      add_action( 'wcfmmp_store_article_template', function() {
      	$rigid_custom_options = get_post_custom(get_the_ID());
      
      	$rigid_featured_slider = 'none';
      
      	if (isset($rigid_custom_options['rigid_rev_slider']) && trim($rigid_custom_options['rigid_rev_slider'][0]) != '' && function_exists('putRevSlider')) {
      		$rigid_featured_slider = $rigid_custom_options['rigid_rev_slider'][0];
      	}
      	$rigid_rev_slider_before_header = 0;
      	if (isset($rigid_custom_options['rigid_rev_slider_before_header']) && trim($rigid_custom_options['rigid_rev_slider_before_header'][0]) != '') {
      		$rigid_rev_slider_before_header = $rigid_custom_options['rigid_rev_slider_before_header'][0];
      	}
      
      	$rigid_featured_flex_slider_imgs = rigid_get_more_featured_images(get_the_ID());
      
      	// Blog style
      	$rigid_general_blog_style = rigid_get_option('general_blog_style');
      
      	// Featured image size
      	$rigid_featured_image_size = 'rigid-portfolio-single-thumb';
      
      	// If is latest posts
      	if (isset($rigid_is_latest_posts) && $rigid_is_latest_posts) { // If is latest post shortcode
      	    $rigid_featured_image_size = 'rigid-640x640';
      	}
      
      	$rigid_post_classes = array('blog-post');
      	if (!has_post_thumbnail()) {
      		array_push($rigid_post_classes, 'rigid-post-no-image');
      	}
      
      	// Show or not the featured image in single post view
      	if(is_singular(array('post'))) {
      		$rigid_show_feat_image_in_post = 'yes';
      		if (isset($rigid_custom_options['rigid_show_feat_image_in_post']) && trim($rigid_custom_options['rigid_show_feat_image_in_post'][0]) != '') {
      			$rigid_show_feat_image_in_post = $rigid_custom_options['rigid_show_feat_image_in_post'][0];
      		}
      	}
      	?>
      	<div id="post-<?php the_ID(); ?>" <?php post_class($rigid_post_classes); ?>>
      	<!-- Featured content for post list -->
      	<!--	Hide image if is latest posts shortcode and hide_image is selected-->
      	<?php if (isset($rigid_is_latest_posts) && isset($rigid_blogposts_param_hide_image) && $rigid_blogposts_param_hide_image === 'no' || !isset($rigid_blogposts_param_hide_image)): ?>
      		<?php if (!empty($rigid_featured_flex_slider_imgs) && is_singular()): // if there is slider or featured image attached and it is single post view, display it  ?>
      			<div class="rigid_flexslider post_slide">
      				<ul class="slides">
      					<?php if (has_post_thumbnail()): ?>
      						<li>
      							<?php echo wp_get_attachment_image(get_post_thumbnail_id(), $rigid_featured_image_size); ?>
      						</li>
      					<?php endif; ?>
      
      					<?php foreach ($rigid_featured_flex_slider_imgs as $rigid_img_att_id): ?>
      						<li>
      							<?php echo wp_get_attachment_image($rigid_img_att_id, $rigid_featured_image_size); ?>
      						</li>
      					<?php endforeach; ?>
      				</ul>
      				<?php if (!is_single()): ?>
      					<div class="portfolio-unit-info">
      						<a class="go_to_page go_to_page_blog" title="<?php esc_attr_e('View', 'rigid') ?>" href="<?php echo esc_url(get_permalink()) ?>"><?php the_title() ?></a>
      					</div>
      				<?php endif; ?>
      			</div>
      		<?php elseif (!$rigid_rev_slider_before_header && $rigid_featured_slider != 'none' && function_exists('putRevSlider')): ?>
      			<div class="slideshow">
      				<?php putRevSlider($rigid_featured_slider) ?>
      			</div>
      		<?php elseif (has_post_thumbnail() && (!is_single() || is_singular(array('post')) && $rigid_show_feat_image_in_post == 'yes')): ?>
      			<div class="post-unit-holder">
      				<?php the_post_thumbnail($rigid_featured_image_size); ?>
      				<?php if (!is_single()): ?>
      					<div class="portfolio-unit-info">
      						<a class="go_to_page go_to_page_blog" title="<?php esc_attr_e('View', 'rigid') ?>" href="<?php echo esc_url(get_permalink()) ?>"><?php the_title() ?></a>
      					</div>
      				<?php endif; ?>
      			</div>
      		<?php endif; ?>
      	<?php endif; ?>
      	<!-- End Featured content for post list -->
      
      	<div class="rigid_post_data_holder">
      		<?php if ( ! is_singular() ): ?>
      			<?php get_template_part( 'partials/blog-post-meta-top' ); ?>
      		<?php endif; ?>
      		<?php if (!is_single()): ?>
      			<h2	class="heading-title">
      				<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a>
      			</h2>
      		<?php endif; ?>
      
      		<?php if ( ! is_singular() ): ?>
      			<?php get_template_part( 'partials/blog-post-meta-bottom' ); ?>
      		<?php endif; ?>
      
      		<!-- SINGLE POST CONTENT -->
      		<?php if (is_single()): ?>
      			<?php the_content(); ?>
      			<div class="clear"></div>
      			<?php if (rigid_get_option('show_author_info') && (trim(get_the_author_meta('description')))): ?>
      				<div class="rigid-author-info">
      					<div class="title">
      						<h2><?php echo esc_html__('About the Author:', 'rigid'); ?> <?php the_author_posts_link(); ?></h2>
      					</div>
      					<div class="rigid-author-content">
      						<div class="avatar">
      							<?php echo get_avatar(get_the_author_meta('email'), 72); ?>
      						</div>
      						<div class="description">
      							<?php the_author_meta("description"); ?>
      						</div>
      						<div class="clear"></div>
      					</div>
      				</div>
      			<?php endif; ?>
      			
      		<?php else: ?>
      			<?php // BLOG / ARCHIVE / CATEGORY / TAG / SEARCH / SHORTCODE POST CONTENT ?>
                  <div class="blog-post-excerpt">
      				<?php
      				if(isset($post->post_content) && strpos( $post->post_content, '<!--more-->' ) ) {
      					the_content();
      				}
      				else {
      					echo '<div class="rigid-defined-excerpt">';
      					the_excerpt();
      					echo '</div>';
      				}
      				?>
                  </div>
      		<?php endif; ?>
      	</div>
      </div>
          <?php
      });
      
      add_action( 'wcfmmp_store_article_template_none', function() {
      	?>
      	<p><?php esc_html_e( 'No posts were found. Sorry!', 'rigid' ); ?></p>
      	<?php
      });
      add_filter( 'wcfm_is_allow_store_articles', '__return_true' );

      Thanks.

  • #130959
    Avatar
    DDNaviagtor
    Participant

    Hi,

    thanks for the quick response.

    Regards

  • #131316
    Avatar
    DDNaviagtor
    Participant

    Hi,

    i have added the code to child-functions.php. The following error display appears:

    “Parse error: syntax error, unexpected ‘&’ in /homepages/u71643/b2b/wp-content/themes/rigid-child/functions.php on line 100” (this concerns the first line of your code).

    Thanks.
    Regards

    • #131343

      Hello,

      Possibly the code was not paste the properly. Try again –

      add_action( 'wcfmmp_store_article_template', function() {
      	$rigid_custom_options = get_post_custom(get_the_ID());
      
      	$rigid_featured_slider = 'none';
      
      	if (isset($rigid_custom_options['rigid_rev_slider']) && trim($rigid_custom_options['rigid_rev_slider'][0]) != '' && function_exists('putRevSlider')) {
      		$rigid_featured_slider = $rigid_custom_options['rigid_rev_slider'][0];
      	}
      	$rigid_rev_slider_before_header = 0;
      	if (isset($rigid_custom_options['rigid_rev_slider_before_header']) && trim($rigid_custom_options['rigid_rev_slider_before_header'][0]) != '') {
      		$rigid_rev_slider_before_header = $rigid_custom_options['rigid_rev_slider_before_header'][0];
      	}
      
      	$rigid_featured_flex_slider_imgs = rigid_get_more_featured_images(get_the_ID());
      
      	// Blog style
      	$rigid_general_blog_style = rigid_get_option('general_blog_style');
      
      	// Featured image size
      	$rigid_featured_image_size = 'rigid-portfolio-single-thumb';
      
      	// If is latest posts
      	if (isset($rigid_is_latest_posts) && $rigid_is_latest_posts) { // If is latest post shortcode
      	    $rigid_featured_image_size = 'rigid-640x640';
      	}
      
      	$rigid_post_classes = array('blog-post');
      	if (!has_post_thumbnail()) {
      		array_push($rigid_post_classes, 'rigid-post-no-image');
      	}
      
      	// Show or not the featured image in single post view
      	if(is_singular(array('post'))) {
      		$rigid_show_feat_image_in_post = 'yes';
      		if (isset($rigid_custom_options['rigid_show_feat_image_in_post']) && trim($rigid_custom_options['rigid_show_feat_image_in_post'][0]) != '') {
      			$rigid_show_feat_image_in_post = $rigid_custom_options['rigid_show_feat_image_in_post'][0];
      		}
      	}
      	?>
      	<div id="post-<?php the_ID(); ?>" <?php post_class($rigid_post_classes); ?>>
      	<!-- Featured content for post list -->
      	<!--	Hide image if is latest posts shortcode and hide_image is selected-->
      	<?php if (isset($rigid_is_latest_posts) && isset($rigid_blogposts_param_hide_image) && $rigid_blogposts_param_hide_image === 'no' || !isset($rigid_blogposts_param_hide_image)): ?>
      		<?php if (!empty($rigid_featured_flex_slider_imgs) && is_singular()): // if there is slider or featured image attached and it is single post view, display it  ?>
      			<div class="rigid_flexslider post_slide">
      				<ul class="slides">
      					<?php if (has_post_thumbnail()): ?>
      						<li>
      							<?php echo wp_get_attachment_image(get_post_thumbnail_id(), $rigid_featured_image_size); ?>
      						</li>
      					<?php endif; ?>
      
      					<?php foreach ($rigid_featured_flex_slider_imgs as $rigid_img_att_id): ?>
      						<li>
      							<?php echo wp_get_attachment_image($rigid_img_att_id, $rigid_featured_image_size); ?>
      						</li>
      					<?php endforeach; ?>
      				</ul>
      				<?php if (!is_single()): ?>
      					<div class="portfolio-unit-info">
      						<a class="go_to_page go_to_page_blog" title="<?php esc_attr_e('View', 'rigid') ?>" href="<?php echo esc_url(get_permalink()) ?>"><?php the_title() ?></a>
      					</div>
      				<?php endif; ?>
      			</div>
      		<?php elseif (!$rigid_rev_slider_before_header && $rigid_featured_slider != 'none' && function_exists('putRevSlider')): ?>
      			<div class="slideshow">
      				<?php putRevSlider($rigid_featured_slider) ?>
      			</div>
      		<?php elseif (has_post_thumbnail() && (!is_single() || is_singular(array('post')) && $rigid_show_feat_image_in_post == 'yes')): ?>
      			<div class="post-unit-holder">
      				<?php the_post_thumbnail($rigid_featured_image_size); ?>
      				<?php if (!is_single()): ?>
      					<div class="portfolio-unit-info">
      						<a class="go_to_page go_to_page_blog" title="<?php esc_attr_e('View', 'rigid') ?>" href="<?php echo esc_url(get_permalink()) ?>"><?php the_title() ?></a>
      					</div>
      				<?php endif; ?>
      			</div>
      		<?php endif; ?>
      	<?php endif; ?>
      	<!-- End Featured content for post list -->
      
      	<div class="rigid_post_data_holder">
      		<?php if ( ! is_singular() ): ?>
      			<?php get_template_part( 'partials/blog-post-meta-top' ); ?>
      		<?php endif; ?>
      		<?php if (!is_single()): ?>
      			<h2	class="heading-title">
      				<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a>
      			</h2>
      		<?php endif; ?>
      
      		<?php if ( ! is_singular() ): ?>
      			<?php get_template_part( 'partials/blog-post-meta-bottom' ); ?>
      		<?php endif; ?>
      
      		<!-- SINGLE POST CONTENT -->
      		<?php if (is_single()): ?>
      			<?php the_content(); ?>
      			<div class="clear"></div>
      			<?php if (rigid_get_option('show_author_info') && (trim(get_the_author_meta('description')))): ?>
      				<div class="rigid-author-info">
      					<div class="title">
      						<h2><?php echo esc_html__('About the Author:', 'rigid'); ?> <?php the_author_posts_link(); ?></h2>
      					</div>
      					<div class="rigid-author-content">
      						<div class="avatar">
      							<?php echo get_avatar(get_the_author_meta('email'), 72); ?>
      						</div>
      						<div class="description">
      							<?php the_author_meta("description"); ?>
      						</div>
      						<div class="clear"></div>
      					</div>
      				</div>
      			<?php endif; ?>
      			
      		<?php else: ?>
      			<?php // BLOG / ARCHIVE / CATEGORY / TAG / SEARCH / SHORTCODE POST CONTENT ?>
                  <div class="blog-post-excerpt">
      				<?php
      				if(isset($post->post_content) && strpos( $post->post_content, '<!--more-->' ) ) {
      					the_content();
      				}
      				else {
      					echo '<div class="rigid-defined-excerpt">';
      					the_excerpt();
      					echo '</div>';
      				}
      				?>
                  </div>
      		<?php endif; ?>
      	</div>
      </div>
          <?php
      });
      
      add_action( 'wcfmmp_store_article_template_none', function() {
      	?>
      	<p><?php esc_html_e( 'No posts were found. Sorry!', 'rigid' ); ?></p>
      	<?php
      });
      
      add_action( 'wcfmmp_before_store_article_loop_end', function( $store_id, $store_info ) { ?>
      	<!-- PAGINATION -->
                          <div class="box box-common">
      						<?php
      						if ( function_exists( 'rigid_pagination' ) ) : rigid_pagination();
      						else :
      							?>
      
                                  <div class="navigation group">
                                      <div class="alignleft"><?php next_posts_link( __( 'Next &raquo;', 'rigid' ) ) ?></div>
                                      <div class="alignright"><?php previous_posts_link( __( '&laquo; Back', 'rigid' ) ) ?></div>
                                  </div>
      
      						<?php endif; ?>
                          </div>
                          <!-- END OF PAGINATION -->
                          <?php
      	
      }, 50, 2);
      add_filter( 'wcfm_is_allow_store_articles', '__return_true' );

      If you still getting error, please share us Site url and FTP access, then we can check your site (Set as private reply).

      Thanks.

  • #131344

    And For Rigid theme, please override “wcfmmp-view-store-articles.php” file in your child theme(\themes\rigid-child\wcfm\store) from “\plugins\wc-multivendor-marketplace\views\store” . Remove the –

    <?php do_action( 'wcfmmp_woocommerce_after_shop_loop_before', $store_user->get_id(), $store_info ); ?>
    			<?php do_action( 'woocommerce_after_shop_loop' ); ?>
    			<?php do_action( 'wcfmmp_woocommerce_after_shop_loop_after', $store_user->get_id(), $store_info ); ?>

    Thanks.

  • #131403
    Avatar
    DDNaviagtor
    Participant
    This reply has been marked as private.
  • #132444
    Avatar
    DDNaviagtor
    Participant
    This reply has been marked as private.
    • #132549

      Hello,

      We have solved the PHP error, Your code was not paste the properly. Please check now the “Article tab”, we do not have site password, so we cannot check the store page.

      Thanks.

  • #132554
    Avatar
    DDNaviagtor
    Participant

    Perfect. Everything works and the tab is also displayed. Thanks a lot!

  • #132863
    Avatar
    ceo3
    Participant

    My template is: North (https://themeforest.net/item/north-responsive-woocommerce-theme/9117256)

    What’s the code for it?

  • #133024

    Hello,

    Try this code for North (https://themeforest.net/item/north-responsive-woocommerce-theme/9117256)

    add_action( 'wcfmmp_store_article_template', function() {
    	?>
    <article itemscope itemtype="http://schema.org/BlogPosting" <?php post_class('post style1'); ?> id="post-<?php the_ID(); ?>" role="article">
    	  	<?php if ( has_post_thumbnail() ) { ?>
    		<figure class="post-gallery">
    			<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>">
    				<?php the_post_thumbnail('north-blog-masonry-2x'); ?>
    			</a>
    		</figure>
    		<?php } ?>
    	  	<aside class="post-meta">
    			<time class="time" datetime="<?php echo esc_attr( get_the_date( 'c' ) ); ?>"><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_time( get_option( 'date_format' ) ); ?></a></time> - <?php the_category(', '); ?>
    		</aside>
    	  	<header class="post-title entry-header">
    			<?php the_title('<h3 class="entry-title" itemprop="name headline"><a href="'.get_permalink().'" title="'.the_title_attribute("echo=0").'">', '</a></h3>'); ?>
    		</header>
    		<div class="post-content">
    			<?php the_excerpt(); ?>
    		</div>
    		<?php do_action( 'thb_PostMeta' ); ?>
    	  </article>
        <?php
    });
    
    add_action( 'wcfmmp_store_article_template_none', function() {
    	?>
    		<p><?php _e( 'No posts found.', 'north' ); ?></p>					
    	<?php
    
    });
    
    add_filter( 'wcfm_is_allow_store_articles', '__return_true' );

    Thanks.

  • #133188
    Avatar
    ceo3
    Participant

    Thank you. It worked. If I want to change it to show the news in the template’s grid format, how do I do it?

    Another question, how could I use this code to have another tab showing a custom custom post type?

  • #133189
    Avatar
    ceo3
    Participant

    Deculpe, but I forgot to take one more question, how do I display it only on the store page, and not on the home and other parts of the site?

  • #133456

    Hello,

    I want to change it to show the news in the template’s grid format, how do I do it?
    >> For this “wcfmmp_store_article_template” function body which we have mentioned previously. This is theme customizations. You will find the “theme blog template here -“\wp-content\themes\north-wp\inc\templates\blogbit”

    how could I use this code to have another tab showing a custom custom post type?
    >> Please check here – https://wordpress.org/support/topic/custom-tab-in-vendor-store-page/

    I forgot to take one more question, how do I display it only on the store page, and not on the home and other parts of the site?
    >>Sorry this point is not clear, the above code we have mentioned you previous reply is for add “article” tab for vendor store page.

    Thanks.

  • #133480
    Avatar
    emmagrimberg
    Participant

    Hi,
    I use orchid-store theme,
    could you help me to add “Articles” tab, please

    • #133504

      Hi,

      Try this code in your theme’s functiions.php for orchid-store theme-

      add_action( 'wcfmmp_after_store_article_loop_start', function() {
      	echo '<div class="archive-page-wrap"><div class="archive-entry">';
      });
      add_action( 'wcfmmp_before_store_article_loop_end', function() {
      	echo '</div></div>';
      });
      
      add_action( 'wcfmmp_store_article_template', function() {
      	$orchid_store_show_featured_image   = '';
      	$orchid_store_show_categories       = '';
      	$orchid_store_show_excerpt          = '';
      	$orchid_store_show_author           = '';
      	$orchid_store_show_date             = '';
      
      	if( is_archive() ) {
      
      	    $orchid_store_show_featured_image   = orchid_store_get_option( 'archive_featured_image' );
      	    $orchid_store_show_categories       = orchid_store_get_option( 'archive_display_cats' );
      	    $orchid_store_show_excerpt          = orchid_store_get_option( 'archive_display_excerpt' );
      	    $orchid_store_show_author           = orchid_store_get_option( 'archive_display_author' );
      	    $orchid_store_show_date             = orchid_store_get_option( 'archive_display_date' );
      	} else {
      
      	    $orchid_store_show_featured_image   = orchid_store_get_option( 'blog_featured_image' );
      	    $orchid_store_show_categories       = orchid_store_get_option( 'blog_display_cats' );
      	    $orchid_store_show_excerpt          = orchid_store_get_option( 'blog_display_excerpt' );
      	    $orchid_store_show_author           = orchid_store_get_option( 'blog_display_author' );
      	    $orchid_store_show_date             = orchid_store_get_option( 'blog_display_date' );
      	}
      	?>
      	<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
      	    <div class="os-row">
      	        <?php
      	        if( has_post_thumbnail() && $orchid_store_show_featured_image == true ) {
      	            ?>
      	            <div class="os-col thumb-col">
      	                <div class="thumb imghover">
      	                    <a href="<?php the_permalink(); ?>">
      	                    	<?php 
      	                    	the_post_thumbnail( 'orchid-store-thumbnail-extra-large', array(
      	    						'alt' => the_title_attribute( array(
      	    							'echo' => false,
      	    						) ),
      	    					) ); 
      	    					?>
      	    			</a>
      	                </div><!-- .thumb.imghover -->
      	            </div><!-- .os-col.thumb-col -->
      	            <?php
      	        }
      	        ?>
      	        <div class="os-col content-col">
      	            <div class="box">
      	                <?php
      	                if( $orchid_store_show_categories == true ) {
      	                    /**
      	                    * Hook - orchid_store_post_categories.
      	                    *
      	                    * @hooked orchid_store_post_categories_action - 10
      	                    */
      	                    do_action( 'orchid_store_post_categories' );
      	                }
      	                ?>
      	                <div class="title">
      	                    <h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
      	                </div><!-- .title -->
      	                <?php
      	                if( $orchid_store_show_excerpt == true ) {
      	                    /**
      	                    * Hook - orchid_store_excerpt.
      	                    *
      	                    * @hooked orchid_store_excerpt_action - 10
      	                    */
      	                    do_action( 'orchid_store_excerpt' );
      	                }
      
      	                if( $orchid_store_show_author == true || $orchid_store_show_date == true ) {
      	                    ?>
      	                    <div class="entry-metas" style="clear: both;"">
      	                        <ul>
      	                            <?php
      	                            if( $orchid_store_show_author == true ) {
      	                                /**
      	                                * Hook - orchid_store_post_author.
      	                                *
      	                                * @hooked orchid_store_post_author_action - 10
      	                                */
      	                                do_action( 'orchid_store_post_author' );
      	                            }
      
      	                            if( $orchid_store_show_date == true ) {
      	                                /**
      	                                * Hook - orchid_store_post_date.
      	                                *
      	                                * @hooked orchid_store_post_date_action - 10
      	                                */
      	                                do_action( 'orchid_store_post_date' );
      	                            }
      	                            ?>
      	                        </ul>
      	                    </div><!-- .entry-metas -->
      	                    <?php
      	                }
      	                ?>
      	            </div><!-- .box -->
      	        </div><!-- .os-col -->
      	    </div><!-- .os-row -->
      	</article><!-- #post-<?php the_ID(); ?> -->
      	<?php
      });
      
      add_action( 'wcfmmp_store_article_template_none', function() {
      	?>
      		<p><?php _e( 'No posts found.', 'north' ); ?></p>					
      	<?php
      
      });
      
      add_filter( 'wcfm_is_allow_store_articles', '__return_true' );

      and add below css in your theme’s style.css –

      #wcfmmp-store .article_area ul li {
          padding: 0 0 6px 0px !important;
      }

      Thanks.

  • #133521
    Avatar
    emmagrimberg
    Participant

    thank you very much

  • #133748
    Avatar
    ceo3
    Participant

    Hi, Sarmistha Chakraborty,

    I want to change it to show the news in the template’s grid format, how do I do it?
    >> For this “wcfmmp_store_article_template” function body which we have mentioned previously. This is theme customizations. You will find the “theme blog template here -“\wp-content\themes\north-wp\inc\templates\blogbit”

    Can you send me a template file to list a custom post type in a grid?

    how could I use this code to have another tab showing a custom custom post type?
    >> Please check here – https://wordpress.org/support/topic/custom-tab-in-vendor-store-page/

    I’ve done everything in (https://wordpress.org/support/topic/custom-tab-in-vendor-store-page/) but keep listing products, where in the code do I change to display a custom post type (CPT “artists”)?

    I forgot to take one more question, how do I display it only on the store page, and not on the home and other parts of the site?
    >>Sorry this point is not clear, the above code we have mentioned you previous reply is for add “article” tab for vendor store page.

    I’ll be clearer. How to make news from the supplier only display on the supplier’s page. It cannot display on the website’s homepage.

    Tanks

  • #134102

    Hello,

    Can you send me a template file to list a custom post type in a grid?
    >>We have not any template as per your requirement(custom post type in a grid), Please check all store tab template here – “\wp-content\plugins\wc-multivendor-marketplace\views\store”
    And you have to template for custom post type, in this way.
    And we have already mentioned you how to display “article” here – https://wclovers.com/forums/topic/request-custom-tabs-manager-in-vendor-store-page/#post-133024

    I’ve done everything in (https://wordpress.org/support/topic/custom-tab-in-vendor-store-page/) but keep listing products, where in the code do I change to display a custom post type (CPT “artists”)?
    >> Please the “wcfmmp_rewrite_rules_loaded” code properly. As per mentioned here – https://wordpress.org/support/topic/custom-tab-in-vendor-store-page/
    Example –

    add_action( 'wcfmmp_rewrite_rules_loaded', function( $wcfm_store_url ) {
    	global $WCFM, $WCFMmp;  
      add_rewrite_rule( $wcfm_store_url.'/([^/]+)/'.$WCFMmp->wcfmmp_rewrite->store_endpoint('artists').'?$', 'index.php?post_type=artists&'.$wcfm_store_url.'=$matches[1]&'.$WCFMmp->wcfmmp_rewrite->store_endpoint('artists').'=true', 'top' );
    }, 50 );

    I’ll be clearer. How to make news from the supplier only display on the supplier’s page. It cannot display on the website’s homepage.
    >> If you want to display only admin articles in home page –
    Try this –

    function be_exclude_vendor_from_blog( $query ) {
    	
    	if( !wcfm_is_store_page() ) {
    		$query->set( 'author', 1 ); //replace 1 with your admin id
    	}
    }
    add_action( 'pre_get_posts', 'be_exclude_vendor_from_blog' );

    Thanks.

  • #134528
    Avatar
    ceo3
    Participant

    Tab Code:

    
    add_action( 'wcfmmp_rewrite_rules_loaded', function( $wcfm_store_url ) {
    	global $WCFM, $WCFMmp;  
      add_rewrite_rule( $wcfm_store_url.'/([^/]+)/'.$WCFMmp->wcfmmp_rewrite->store_endpoint('artistas').'?$', 'index.php?post_type=artistas&'.$wcfm_store_url.'=$matches[1]&'.$WCFMmp->wcfmmp_rewrite->store_endpoint('artistas').'=true', 'top' );
    }, 50 );
    
    add_filter( 'query_vars', function( $vars ) {
    	$vars[] = 'artistas';
    	return $vars;
    }, 50 );
    
    add_filter( 'wcfmmp_store_tabs', function( $store_tabs, $store_id ) {
      $store_tabs['artistas'] = 'Artistas 3';
      return $store_tabs;
    }, 50, 2 );
    
    add_filter( 'wcfmp_store_tabs_url', function( $store_tab_url, $tab ) {
    	if( $tab == 'artistas' ) {
    		$store_tab_url .= 'artistas';
    	}
    	return $store_tab_url;
    }, 50, 2 );
    
    add_filter( 'wcfmp_store_default_query_vars', function( $query_var ) {
    	global $WCFM, $WCFMmp;
    	
    	if ( get_query_var( 'artistas' ) ) {
    		$query_var = 'artistas';
    	}
    	return $query_var;
    }, 50 );
    
    add_filter( 'wcfmmp_store_default_template', function( $template, $tab ) {
      if( $tab == 'artistas' ) {
      	$template = 'store/wcfmmp-view-store-artistas.php';
      }
      return $template;
    }, 50, 2);
    

    Template file code:

    
    <?php
    	$vars    = $wp_query->query_vars;
    	$columns = array_key_exists('columns', $vars) ? $vars['columns'] : 3;
    	$cols    = 'large-4';
    	switch($columns) {
    		case '1':
    			$cols = 'large-12';
    			break;
    		case '2':
    			$cols = 'medium-6 large-6';
    			break;
    		case '3':
    		default:
    			$cols = 'medium-6 large-4';
    			break;
    		case '4':
    			$cols = 'medium-6 large-3';
    			break;
    	}
    ?>
    <div class="small-12 <?php echo esc_attr($cols); ?> columns item">
    	<article itemscope itemtype="http://schema.org/Article" <?php post_class('post style1'); ?>>
    		<?php if ( has_post_thumbnail() ) { ?>
    		<figure class="post-gallery">
    			<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>">
    				<?php the_post_thumbnail( 'north-blog-masonry-2x' ); ?>
    			</a>
    		</figure>
    		<?php } ?>
    		<?php get_template_part( 'inc/templates/postbit/post-categories'); ?>
    		<header class="post-title entry-header">
    			<?php the_title('<h3 class="entry-title" itemprop="name headline"><a href="'.get_permalink().'" title="'.the_title_attribute("echo=0").'">', '</a></h3>'); ?>
    		</header>
    		<div class="post-content">
    			<?php the_excerpt(); ?>
    		</div>
    		<?php do_action( 'thb_PostMeta' ); ?>
    	</article>
    </div>
    

    Attached screen showing that you continue to display products. Need that display custom post type (cpt) “artistas”.

    Attachments:
    You must be logged in to view attached files.
  • #134992

    Add this code also in your theme’s functions.php –

    add_filter( 'pre_get_posts', 'artistas_store_query_filter' , 9999, 2 );
    
    function artistas_store_query_filter( $query, $that = null ) {
      global $wp_query, $WCFMmp;
      
      
      $store_name = apply_filters( 'wcfmmp_store_query_var', get_query_var( $WCFMmp->wcfmmp_rewrite->wcfm_store_url ) );
    
      if ( !is_admin() && $query->is_main_query() && !empty( $store_name ) ) {
        $seller_info  = get_user_by( 'slug', $store_name );
        if( $seller_info ) {
          
          // WC Product Query
          if ( !get_query_var( 'articles' ) ) {
            //WC()->query->product_query( $query );
          }
          
          $store_info   = wcfmmp_get_store_info( $seller_info->data->ID );
          
          if( apply_filters( 'wcfmmp_is_allow_store_ppp', true ) ) {
            $global_store_ppp = isset( $WCFMmp->wcfmmp_marketplace_options['store_ppp'] ) ? $WCFMmp->wcfmmp_marketplace_options['store_ppp'] : get_option( 'posts_per_page', 12 );
            $post_per_page = isset( $store_info['store_ppp'] ) && !empty( $store_info['store_ppp'] ) ? $store_info['store_ppp'] : $global_store_ppp;
            $query->set( 'posts_per_page', apply_filters( 'wcfmmp_store_ppp', $post_per_page ) );
          }
          
          if ( get_query_var( 'articles' ) ) {
            $query->set( 'post_type', 'post' );
          } else if(get_query_var( 'artistas' )) {
          	$query->set( 'post_type', 'artistas' ); //replace artistas with your post type name
    
          //print_r($query);die;
          } else {
            $query->set( 'post_type', 'product' );
    		$query->set( 'wc_query', 'product_query' );
            //print_r($query);die;
          }
         $query->set( 'post_status', 'publish' );
    	 $query->set( 'author_name', $store_name );
    	 $query->query['term_section'] = isset( $query->query['term_section'] ) ? $query->query['term_section'] : array();
    
      	if ( $query->query['term_section'] ) {
    					$is_custom_taxonomy_filter = false;
    					// Custom Taxonomies Filter Rules
    					$product_taxonomies = get_object_taxonomies( 'product', 'objects' );
    					if( !empty( $product_taxonomies ) ) {
    						foreach( $product_taxonomies as $product_taxonomy ) {
    							if( !in_array( $product_taxonomy->name, array( 'product_cat', 'product_tag', 'wcpv_product_vendors' ) ) ) {
    								if( $product_taxonomy->public && $product_taxonomy->show_ui && $product_taxonomy->meta_box_cb && $product_taxonomy->hierarchical ) {
    									$query->query['tax-'.$product_taxonomy->name] = isset( $query->query['tax-'.$product_taxonomy->name] ) ? $query->query['tax-'.$product_taxonomy->name] : array();
    									
    									if ( $query->query['tax-'.$product_taxonomy->name] ) {
    									  $is_custom_taxonomy_filter = true;
    										$query->set( 'tax_query',
    											array(
    												'relation' => 'AND',
    												array(
    													'taxonomy' => $product_taxonomy->name,
    													'field'    => 'slug',
    													'terms'    => $query->query['term'],
    													'operator' => 'IN'
    												)
    											)
    										);
    									}
    								}
    							}
    						}
    					}
    					
    					if( !$is_custom_taxonomy_filter ) {
    						$query->set( 'tax_query',
    							array(
    								array(
    									'taxonomy' => 'product_cat',
    									'field'    => 'slug',
    									'terms'    => $query->query['term']
    								)
    							)
    						);
    					}
    				}
    				
    				// Reset Shop Page ID - Specially Fix for Divi Theme
    				$query->set( 'page_id', 0 );
    				
    				if( defined( 'ELEMENTOR_VERSION' )  ) {
    					if( apply_filters( 'wcfmmp_is_allow_elementor_is_single_reset', true ) )
    						$query->is_single               = false;
    					
    					if( apply_filters( 'wcfmmp_is_allow_elementor_is_singular_reset', true ) )
    						$query->is_singular             = false;
    					
    					if( apply_filters( 'wcfmmp_is_allow_elementor_is_archive_reset', true ) )
    						$query->is_archive              = false;
    					
    					if( apply_filters( 'wcfmmp_is_allow_elementor_is_post_type_archive_reset', true ) )
    						$query->is_post_type_archive    = false;
    				}
    				
    				//print_r($query);
    				
    				add_filter( 'woocommerce_page_title', array( $WCFMmp->wcfmmp_rewrite
            , 'store_page_title' ) );
        }
      }
    }

    Thanks.

  • #135026
    Avatar
    ceo3
    Participant

    I use the NORTH template with Visual Composer (WP Bakery), can I send this appropriate code?

    https://themeforest.net/item/north-responsive-woocommerce-theme/9117256

  • #135115

    Hello,

    can I send this appropriate code?
    >>What do you mean by this?

    In this #132863 reply, you asked for the vendor’s article to be displayed in vendor’s store page. and we have already given you a solution for this in this reply #133024.
    After that you asked for display custom tab in vendor’s store for custom post type. And in this reply #134528 you mentioned custom tab has been added but it is displaying products. Now our previous reply we have suggested you add the mentioned code with your already exciting code. It will display your custom post type items.
    Now what is your exact requirement?

  • #135276
    Avatar
    ceo3
    Participant

    the last code you sent me is for those who use ELEMENTOR and the DIVI theme. I am not use ELEMENTOR.

    My theme is NORTH and I use VISUAL COMPOSER. I need the code for the NORTH and VISUAL composer. Understood? Tanks

  • #135286

    The code we have shared in this reply #134992 is not for only ELEMENTOR, It will work for all.
    Have you a chance to check the “artistas” tab after adding the code?
    We have also mentioned in code where you have to add your custom post type slug.

    Thanks.

  • #135300
    Avatar
    ceo3
    Participant

    ok i will test. Another question, how do I display this personalized “artistas” posting tab on the frontend, according to permissions (capability) in the groups and staff plugin in the admin.

    Can you send me the code for this?

    Tanks.

  • #135357

    Hello,

    We have already guided you on how to add custom capability for custom post type in groups and staff panel.
    To hide depends on group/staff capability –

    add_filter( 'wcfmmp_store_tabs', function( $store_tabs, $store_id ) {
    	if (  wcfm_is_store_page() ) {
    		$wcfm_store_url = get_option( 'wcfm_store_url', 'store' );
    		$store_name = apply_filters( 'wcfmmp_store_query_var', get_query_var( $wcfm_store_url ) );
    		$store_id  = 0;
    		if ( !empty( $store_name ) ) {
    			$store_user = get_user_by( 'slug', $store_name );
    		}
    		$store_id   		= $store_user->ID;
    	}	
    	$current_plan = get_user_meta( $store_id, 'wcfm_membership', true );
    	if(isset($current_plan)) {
        $current_group = get_post_meta($current_plan,'associated_group',true);
        $group_capability_options = get_post_meta($current_group,'_group_capability_options',true);
      }
      if(isset($group_capability_options['show_artistas'])) {
          $show_artistas = ( isset( $group_capability_options['show_artistas'] ) ) ? $group_capability_options['show_artistas'] : 'no';
          if( $show_artistas == 'yes' ){
          	unset($store_tabs['artistas']);
          };
        }
     
      return $store_tabs;
    }, 100, 2 );

    Try above code. Replace “$group_capability_options[‘show_artistas’]” with your custom capability name.

    Please be advised You require various changes/customizations and that will require time. Sorry, but the forum isn’t ideal for this type of custom work.
    Due to COVID-19 we are getting 400-500 more support tickets each day. So we aren’t taking any customizations at this moment. It will be better to find someone who is accustom to WP development. Any problem if you face any difficulty at the time of development we will guide you accordingly.

    Thanks.

You must be logged in to reply to this topic.