Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Feature Request › Request Custom Tabs Manager in Vendor Store Page ?
Tagged: custom tabs, Vendor Store Page
- This topic has 81 replies, 13 voices, and was last updated 4 years, 4 months ago by lilia.parra.
- AuthorPosts
- August 13, 2019 at 5:17 am #76346rockprince7Participant
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
- August 13, 2019 at 6:27 am #76374WCFM ForumMember
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
- August 13, 2019 at 7:32 am #76383rockprince7Participant
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 ?
- August 13, 2019 at 7:38 am #76384rockprince7Participant
Does WCFM marketplace Free or Ultimate have custom tab manager ??
- August 19, 2019 at 2:10 pm #77314WCFM ForumMember
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
- December 14, 2019 at 4:48 am #97405snowfreakzParticipant
Hi Rockprince,
Do you have a solution to add a custom tab? I want to show the Posts created by the vendor.
Jasper
- December 24, 2019 at 10:39 am #98884WCFM ForumMember
Yeah sure, please know me which theme you are using for the site?
- December 24, 2019 at 2:59 pm #98932snowfreakzParticipant
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
- December 28, 2019 at 11:54 am #99694WCFM ForumMember
Off course this matters as every theme’s “Article/post” archive template is different.
- December 30, 2019 at 2:59 am #99938snowfreakzParticipant
Ah, i see what you mean 🙂
- January 17, 2020 at 8:39 pm #102488tahitibora1Participant
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
- February 7, 2020 at 12:35 pm #106057WCFM ForumMember
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
- March 31, 2020 at 7:10 pm #114321philippParticipant
How can I sort the Tabs in Vendors Shop Site? I Want the about tab before the products tab
- April 1, 2020 at 7:00 pm #114514tahitibora1Participant
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
- April 4, 2020 at 12:42 pm #115247WCFM ForumMember
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
- April 9, 2020 at 4:35 pm #117249tahitibora1ParticipantThis reply has been marked as private.
- April 12, 2020 at 1:07 pm #118359WCFM ForumMember
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/
- April 9, 2020 at 1:54 am #117023philippParticipant
Hello,
can you give me custom code for rehab or Envo theme?
- April 12, 2020 at 1:05 pm #118357WCFM ForumMember
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
- May 4, 2020 at 12:43 am #126243crzy4prpleParticipant
What would be the code for the layers theme?
- May 4, 2020 at 1:17 pm #126366Sarmistha ChakrabortyMember
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 »'); ?> <?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('« Older Entries') ?></div> <div class="float-right"><?php previous_posts_link('Newer Entries »') ?></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.
- May 14, 2020 at 12:18 am #130620DDNaviagtorParticipant
Hi,
what please is the code for the rigid theme?
Thanks
- May 14, 2020 at 2:23 pm #130890Sarmistha ChakrabortyMember
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.
- May 14, 2020 at 6:07 pm #130959DDNaviagtorParticipant
Hi,
thanks for the quick response.
Regards
- May 15, 2020 at 2:53 pm #131316DDNaviagtorParticipant
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- May 15, 2020 at 4:28 pm #131343Sarmistha ChakrabortyMember
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 »', 'rigid' ) ) ?></div> <div class="alignright"><?php previous_posts_link( __( '« 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.
- May 15, 2020 at 4:32 pm #131344Sarmistha ChakrabortyMember
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.
- May 15, 2020 at 6:38 pm #131403DDNaviagtorParticipantThis reply has been marked as private.
- May 15, 2020 at 8:24 pm #131443Sarmistha ChakrabortyMemberThis reply has been marked as private.
- May 18, 2020 at 12:35 pm #132444DDNaviagtorParticipantThis reply has been marked as private.
- May 18, 2020 at 3:20 pm #132549Sarmistha ChakrabortyMember
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.
- May 18, 2020 at 3:45 pm #132554DDNaviagtorParticipant
Perfect. Everything works and the tab is also displayed. Thanks a lot!
- May 19, 2020 at 6:03 am #132863ceo3Participant
My template is: North (https://themeforest.net/item/north-responsive-woocommerce-theme/9117256)
What’s the code for it?
- May 19, 2020 at 2:59 pm #133024Sarmistha ChakrabortyMember
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.
- May 19, 2020 at 9:41 pm #133188ceo3Participant
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?
- May 19, 2020 at 9:48 pm #133189ceo3Participant
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?
- May 20, 2020 at 1:09 pm #133456Sarmistha ChakrabortyMember
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.
- May 20, 2020 at 2:19 pm #133480emmagrimbergParticipant
Hi,
I use orchid-store theme,
could you help me to add “Articles” tab, please- May 20, 2020 at 3:33 pm #133504Sarmistha ChakrabortyMember
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.
- May 20, 2020 at 4:15 pm #133521emmagrimbergParticipant
thank you very much
- May 21, 2020 at 7:50 am #133748ceo3Participant
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
- May 22, 2020 at 1:41 pm #134102Sarmistha ChakrabortyMember
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-133024I’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.
- May 23, 2020 at 8:44 pm #134528ceo3Participant
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. - May 25, 2020 at 2:53 pm #134992Sarmistha ChakrabortyMember
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.
- May 25, 2020 at 5:11 pm #135026ceo3Participant
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
- May 25, 2020 at 9:18 pm #135115Sarmistha ChakrabortyMember
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? - May 26, 2020 at 9:05 am #135276ceo3Participant
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
- May 26, 2020 at 11:25 am #135286Sarmistha ChakrabortyMember
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.
- May 26, 2020 at 12:24 pm #135300ceo3Participant
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.
- May 26, 2020 at 2:57 pm #135357Sarmistha ChakrabortyMember
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.
- June 4, 2020 at 10:51 am #138235testpaid2322Participant
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
- June 4, 2020 at 8:03 pm #138409Sarmistha ChakrabortyMember
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.
- June 5, 2020 at 10:04 am #138619testpaid2322Participant
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.- June 5, 2020 at 2:22 pm #138718Sarmistha ChakrabortyMember
Hello,
Please check here – https://wordpress.org/support/topic/custom-tab-in-vendor-store-page/ , you find how to add a custom tab in the vendor’s store page.
Thanks.
- June 5, 2020 at 3:20 pm #138728testpaid2322Participant
I tried this but its show only static content..i want dynamic content from vendor login they can add video from their login
- June 5, 2020 at 3:43 pm #138733Sarmistha ChakrabortyMember
Hello,
Add “Custom field” in vendor’s registration, from WCFM dashboard -> settings -> vendor registration (https://wclovers.com/knowledgebase/wcfm-marketplace-vendor-registration/)
Then fetch the custom field value in wcfmmp-view-store-art-works.php template.
$wcfmvm_custom_infos = (array) get_user_meta( $vendor_id, 'wcfmvm_custom_infos', true );
Thanks.
- June 5, 2020 at 4:21 pm #138753testpaid2322Participant
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.- June 5, 2020 at 8:56 pm #138860Sarmistha ChakrabortyMember
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.
- June 6, 2020 at 9:46 am #139004testpaid2322ParticipantThis reply has been marked as private.
- June 6, 2020 at 1:55 pm #139029testpaid2322Participant
Reply awaited..
- June 6, 2020 at 9:47 pm #139128Sarmistha ChakrabortyMember
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.
- June 7, 2020 at 11:56 am #139232testpaid2322Participant
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. - June 8, 2020 at 4:06 pm #139571testpaid2322Participant
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.- June 8, 2020 at 10:35 pm #139696Sarmistha ChakrabortyMember
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.
- June 8, 2020 at 10:20 pm #139689ceo3Participant
Hello, could you help me send you the template file here: wcfmmp-view-store-art-works.php
can attach in a zip.
Thank you.
- June 8, 2020 at 10:37 pm #139701Sarmistha ChakrabortyMember
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.
- June 9, 2020 at 9:09 am #139781testpaid2322Participant
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
- June 9, 2020 at 9:07 am #139779testpaid2322ParticipantThis reply has been marked as private.
- June 9, 2020 at 7:37 pm #139945Sarmistha ChakrabortyMember
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.
- June 10, 2020 at 10:23 am #140141testpaid2322ParticipantThis reply has been marked as private.
- June 10, 2020 at 2:42 pm #140235Sarmistha ChakrabortyMember
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.
- June 10, 2020 at 2:58 pm #140244testpaid2322Participant
Hi Sarmistha,
Thanks for your help..
- June 10, 2020 at 5:37 am #140078Connor MosleyParticipant
How can I do this with the vogue theme by Kaira.
- June 10, 2020 at 2:44 pm #140238Sarmistha ChakrabortyMember
Hello,
Can you explain a little more about your requirement/issue?
Do you want to add “Article” tab for https://wordpress.org/themes/vogue/ theme?
Please confirm.Thanks.
- June 10, 2020 at 3:11 pm #140258Connor MosleyParticipant
Add article tab to vendors store
- June 11, 2020 at 12:27 pm #140528Sarmistha ChakrabortyMember
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">→</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.
- June 10, 2020 at 11:23 pm #140375ceo3Participant
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.- June 11, 2020 at 12:26 pm #140526Sarmistha ChakrabortyMember
Hello,
If you are following this topic – https://wordpress.org/support/topic/custom-tab-in-vendor-store-page/ Or #134992 reply, then you have to create a template file like wcfmmp-view-store-art-works.php in your theme folder.
The template should be placed at “wp-content/themes/your theme folder/wcfm/store” folder. this is not possible with “Snippet Plugin”.Thanks.
- June 11, 2020 at 4:01 pm #140569Connor MosleyParticipant
Error on line 863 which was });
- June 11, 2020 at 10:45 pm #140662Sarmistha ChakrabortyMember
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.
- June 12, 2020 at 6:26 am #140739ceo3ParticipantThis reply has been marked as private.
- July 17, 2020 at 10:00 pm #151519lilia.parraParticipant
Hi,
what please is the code for the Martfury theme?
Thanks
- AuthorPosts
- You must be logged in to reply to this topic.