Request Custom Tabs Manager in Vendor Store Page ?

We're shifting our Forum based support to a more dedicated support system!

We'll be closing our Forum support from 10th June, 2020 and move to Email Support assistance.

  • If you are a WCFM premium add-ons user, contact us- here
  • Want to know more before buying our add-ons? Send Pre sale queries- here
  • If you are a WCFM free user, please open a support ticket at WordPress.org
  • For WCFM App related queries, reach us- here
From now the forum will be read-only!

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

Viewing 58 reply threads
  • Author
    Posts
    • #76346
      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
      Member

      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
      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
      rockprince7
      Participant

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

    • #77314
      WCFM Forum
      Member

      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
      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
      Member

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

    • #98932
      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
      Member

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

    • #99938
      snowfreakz
      Participant

      Ah, i see what you mean 🙂

    • #102488
      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
      Member

      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
      philipp
      Participant

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

    • #114514
      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
      Member

      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
        tahitibora1
        Participant
        This reply has been marked as private.
        • #118359
          WCFM Forum
          Member

          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
      philipp
      Participant

      Hello,

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

    • #118357
      WCFM Forum
      Member

      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
      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
      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
      DDNaviagtor
      Participant

      Hi,

      thanks for the quick response.

      Regards

    • #131316
      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
      DDNaviagtor
      Participant
      This reply has been marked as private.
    • #132444
      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
      DDNaviagtor
      Participant

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

    • #132863
      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
      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
      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
      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
      emmagrimberg
      Participant

      thank you very much

    • #133748
      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
      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
      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
      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
      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.

    • #138235
      testpaid2322
      Participant

      I want to add one custom tab (Live Demo – upload a video on latest promotions) on vendor dashboard and I am Using elessi wp theme..So please guide us

      • #138409

        Hello,

        Can you explain a little more about your requirement(if possible with screenshot). Do you want to add a custom tab in the vendor’s store page or vendor’s dashboard?

        Thanks.

    • #138619
      testpaid2322
      Participant

      I want to add custom tab in given screenshot near review tab named “Live Demo” in which merchant can add promotion video.

      Attachments:
      You must be logged in to view attached files.
    • #138728
      testpaid2322
      Participant

      I tried this but its show only static content..i want dynamic content from vendor login they can add video from their login

    • #138753
      testpaid2322
      Participant

      I have added custom field on vendor registration page and added code in wcfmmp-view-store-art-works.php template but still not able to see video.screenshot are attached for your reference.

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

        Hello,

        To display the value you have to print/echo the variable.
        Try this –

        global $WCFM, $WCFMmp, $wpdb;
        	$vendor_id = $store_user->get_id();	
        	$wcfmmp_addition_info_fields = wcfm_get_option( 'wcfmvm_registration_custom_fields', array() );
        	if( empty( $wcfmmp_addition_info_fields ) ) return;
        	
        	$has_addition_field = false;
        	if( !empty( $wcfmmp_addition_info_fields ) ) {
        		foreach( $wcfmmp_addition_info_fields as $wcfmvm_registration_custom_field ) {
        			if( !isset( $wcfmvm_registration_custom_field['enable'] ) ) continue;
        			if( !$wcfmvm_registration_custom_field['label'] ) continue;
        			$has_addition_field = true;
        			break;
        		}
        	}
        	if( !$has_addition_field ) return;
        	$wcfmvm_custom_infos = (array) get_user_meta( $vendor_id, 'wcfmvm_custom_infos', true );
        	if( !empty( $wcfmmp_addition_info_fields ) ) {
        		foreach( $wcfmmp_addition_info_fields as $wcfmvm_registration_custom_field ) {
        			if( !isset( $wcfmvm_registration_custom_field['enable'] ) ) continue;
        			if( !$wcfmvm_registration_custom_field['label'] ) continue;
        			
        			$field_class = '';
        			$field_value = '';
        			
        			$wcfmvm_registration_custom_field['name'] = sanitize_title( $wcfmvm_registration_custom_field['label'] );
        			$field_name = 'wcfmmp_additional_infos[' . $wcfmvm_registration_custom_field['name'] . ']';
        			$field_id   = md5( $field_name );
        			$ufield_id  = '';
        		
        			if( !empty( $wcfmvm_custom_infos ) ) {
        				if( $wcfmvm_registration_custom_field['type'] == 'upload' ) {
        					$ufield_id = md5( 'wcfmvm_custom_infos[' . sanitize_title( $wcfmvm_registration_custom_field['label'] ) . ']' );
        					$field_value = isset( $wcfmvm_custom_infos[$ufield_id] ) ? $wcfmvm_custom_infos[$ufield_id] : '';
        					$field_value = wcfm_get_attachment_url($field_value);
        					echo $field_value;
        				} 
        			}
        			
        		}
        	}					

        `

        Thanks.

    • #139004
      testpaid2322
      Participant
      This reply has been marked as private.
    • #139029
      testpaid2322
      Participant

      Reply awaited..

    • #139128

      Hello,

      Modify the “echo $field_value;” with –

      <video width="400" controls>
        <source src="<?php echo $field_value; ?>" type="video/mp4">
      </video>
      

      Ref:https://www.w3schools.com/html/tryit.asp?filename=tryhtml5_video

      Thanks.

    • #139232
      testpaid2322
      Participant

      with given code not getting video path in src and also show two video frame but uploaded only one video

      Attachments:
      You must be logged in to view attached files.
    • #139571
      testpaid2322
      Participant

      I resolved video path issue but getting two video frame instead of one in which 1st video frame is blank and second video frame of my video..so please help.

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

        Hello,

        we can see that you have added two video tags here -https://wclovers.com/wp-content/uploads/2020/06/lvdemo_video.png , that is it will display two videos.
        So, can you please share with us the code(and all custom fields in vendor’s profile) which you have added in your site for this purpose, then we can understand your mistakes.

        Thanks.

    • #139689
      ceo3
      Participant

      Hello, could you help me send you the template file here: wcfmmp-view-store-art-works.php

      can attach in a zip.

      Thank you.

      • #139701

        We have already provided you template(guidance) , this type of scenario. So, please go through the previous replies, you will find out how to create “art” template.

        Thanks.

        • #139781
          testpaid2322
          Participant

          Hi Sarmistha,
          I followed your code and have done only one frame of the video, even after that I am showing two video frames.
          Thanks

      • #139779
        testpaid2322
        Participant
        This reply has been marked as private.
    • #139945

      Hello,

      Can you provide us your site admin access with site URL(Set as private reply), then we can check properly and guide you accordingly.

      Thanks.

      • #140141
        testpaid2322
        Participant
        This reply has been marked as private.
        • #140235

          Hello,

          Okay! We have checked your site, there are two file type field.
          Add the condition before the print the value code –

          $video_ext = array('mp4', 'mpeg');
          if (in_array(pathinfo($field_value,  PATHINFO_EXTENSION), $video_ext)) {
          ?>
          <video width="400" controls>
          <source src="<?php echo $field_value; ?>" type="video/mp4">
          </video>
          <?php
          }

          Thanks.

    • #140078
      Connor Mosley
      Participant

      How can I do this with the vogue theme by Kaira.

    • #140258
      Connor Mosley
      Participant

      Add article tab to vendors store

      • #140528

        Hi,

        Try this for vogue theme by Kaira.

        add_action( 'wcfmmp_store_article_template', function() {
        	?>
        	<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
        
        	<div class="blog-post-inner <?php echo ( get_theme_mod( 'vogue-blog-img-shape' ) == 'blog-img-shape-round' ) ? sanitize_html_class( 'blog-post-img-round' ) : ''; ?>">
        		
        		<?php if ( has_post_thumbnail() ) :
        			$vogue_image_cut = customizer_library_get_default( 'vogue-blog-list-img-cut' );
        			if ( get_theme_mod( 'vogue-blog-list-img-cut' ) ) {
        				$vogue_image_cut = get_theme_mod( 'vogue-blog-list-img-cut' );
        			} ?>
        		
        			<?php if ( get_theme_mod( 'vogue-blog-img-shape' ) == 'blog-img-shape-square' || get_theme_mod( 'vogue-blog-img-shape' ) == 'blog-img-shape-round' ) : ?>
        				<a href="<?php the_permalink() ?>" class="post-loop-thumbnail post-loop-thumbnail-img" <?php echo 'style="background-image: url(' . esc_url( get_the_post_thumbnail_url( $post->ID, $vogue_image_cut ) ) . ');"'; ?>>
        					<img src="<?php echo get_template_directory_uri(); ?>/images/blank_blocks_img.png" alt="<?php the_title(); ?>" />
        				</a>
        			<?php else : ?>
        				<a href="<?php the_permalink() ?>" class="post-loop-thumbnail">
        					<?php the_post_thumbnail( $vogue_image_cut ); ?>
        				</a>
        			<?php endif; ?>
        			
        		<?php endif; ?>
        		
        		<div class="post-loop-content">
        			
        			<header class="entry-header">
        				<?php
        				$post_title_tag = get_theme_mod( 'vogue-seo-blog-post-title-tag', customizer_library_get_default( 'vogue-seo-blog-post-title-tag' ) );
        				the_title( sprintf( '<h'.esc_attr( $post_title_tag ).' class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h'.esc_attr( $post_title_tag ).'>' ); ?>
        
        				<?php if ( 'post' == get_post_type() ) : ?>
        				<div class="entry-meta">
        					<?php vogue_posted_on(); ?>
        				</div><!-- .entry-meta -->
        				<?php endif; ?>
        			</header><!-- .entry-header -->
        
        			<div class="entry-content">
        				<?php
        				if ( has_excerpt() ) :
        					the_excerpt();
        				else :
        					/* translators: %s: Name of current post */
        					the_content( sprintf(
        						wp_kses( __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'vogue' ), array( 'span' => array( 'class' => array() ) ) ),
        						the_title( '<span class="screen-reader-text">"', '"</span>', false )
        					) );
        				endif;
        				?>
        
        				<?php
        					wp_link_pages( array(
        						'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'vogue' ),
        						'after'  => '</div>',
        					) );
        				?>
        			</div><!-- .entry-content -->
        
        			<footer class="entry-footer">
        				<?php vogue_entry_footer(); ?>
        			</footer><!-- .entry-footer -->
        			
        		</div>
        		<div class="clearboth"></div>
        	
        	</div>
        	
        </article><!-- #post-## -->
            <?php
        });
        
        add_action( 'wcfmmp_store_article_template_none', function() {
        	?>
        	<p><?php echo wp_kses_post( get_theme_mod( 'vogue-website-nosearch-msg', __( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'vogue' ) ) ) ?></p>
        	<?php
        });
        
        add_filter( 'wcfm_is_allow_store_articles', '__return_true' );

        Thanks.

    • #140375
      ceo3
      Participant

      Hi, I already did everything as directed, but I can’t get the personalized post to appear. Now a “-” is appearing. Can I send the username and password for you to access and help me resolve? Please.

      I don’t know if it’s the source code of the model file.

      I did everything as directed.

      I’m using the Snippet Plugin to place the codes.

      Thank you for your help.

      Attachments:
      You must be logged in to view attached files.
    • #140569
      Connor Mosley
      Participant

      Error on line 863 which was });

      • #140662

        Hello,

        It is difficult to understand what is written in your functions.php at line 863.
        Please share full functions.php code, then we can understand and please mention the error screenshot.

        Thanks.

    • #140739
      ceo3
      Participant
      This reply has been marked as private.
    • #151519
      lilia.parra
      Participant

      Hi,

      what please is the code for the Martfury theme?

      Thanks

Viewing 58 reply threads
  • You must be logged in to reply to this topic.