• Hello, to link the articles to the store I used the code below:

    add_action( ‘wcfmmp_before_store_article’, function( $store_id, $store_info ) {
        ?>
     <div class=”main-side clearfix<?php if (rehub_option(‘archive_layout’) == ‘gridfull’ || rehub_option(‘archive_layout’) == ‘dealgridfull’ || rehub_option(‘archive_layout’) == ‘compactgridfull’ || rehub_option(‘archive_layout’) == ‘columngridfull’ || rehub_option(‘archive_layout’) == ‘cardblogfull’) : ?> full_width<?php endif ;?>”>
                    <?php if (rehub_option(‘archive_layout’) == ‘blog’) : ?>
                        <div class=””>
                    <?php elseif (rehub_option(‘archive_layout’) == ‘newslist’) : ?>
                        <div class=””>
                    <?php elseif (rehub_option(‘archive_layout’) == ‘communitylist’) : ?>
                        <div class=””>
                    <?php elseif (rehub_option(‘archive_layout’) == ‘deallist’) : ?>
                        <div class=”woo_offer_list ” >
                    <?php elseif (rehub_option(‘archive_layout’) == ‘grid’) : ?>
                        <?php  wp_enqueue_script(‘masonry’); wp_enqueue_script(‘imagesloaded’); wp_enqueue_script(‘masonry_init’); ?>
                        <div class=”masonry_grid_fullwidth col_wrap_two”>
                    <?php elseif (rehub_option(‘archive_layout’) == ‘gridfull’) : ?>
                        <?php  wp_enqueue_script(‘masonry’); wp_enqueue_script(‘imagesloaded’); wp_enqueue_script(‘masonry_init’); ?>
                        <div class=”masonry_grid_fullwidth col_wrap_three”>
                    <?php elseif (rehub_option(‘archive_layout’) == ‘columngrid’) : ?>
                        <div class=”columned_grid_module rh-flex-eq-height col_wrap_three” >
                    <?php elseif (rehub_option(‘archive_layout’) == ‘columngridfull’) : ?>
                        <div class=”columned_grid_module rh-flex-eq-height col_wrap_fourth”>
                    <?php elseif (rehub_option(‘archive_layout’) == ‘compactgrid’) : ?>
                        <div class=”eq_grid post_eq_grid rh-flex-eq-height <?php echo (rehub_option(‘width_layout’) ==’extended’) ? ‘col_wrap_fifth’ : ‘col_wrap_fourth’;?>”>
                    <?php elseif (rehub_option(‘archive_layout’) == ‘compactgridfull’) : ?>
                        <div class=”eq_grid post_eq_grid rh-flex-eq-height <?php echo (rehub_option(‘width_layout’) ==’extended’) ? ‘col_wrap_six’ : ‘col_wrap_fifth’;?>”>
                    <?php elseif (rehub_option(‘archive_layout’) == ‘cardblog’) : ?>
                        <div class=”coloredgrid rh-flex-eq-height <?php echo (rehub_option(‘width_layout’) ==’extended’) ? ‘col_wrap_fourth’ : ‘col_wrap_three’;?>”>
                    <?php elseif (rehub_option(‘archive_layout’) == ‘cardblogfull’) : ?>
                        <div class=”coloredgrid rh-flex-eq-height <?php echo (rehub_option(‘width_layout’) ==’extended’) ? ‘col_wrap_fifth’ : ‘col_wrap_fourth’;?>”>
                    <?php elseif (rehub_option(‘archive_layout’) == ‘dealgrid’) : ?>
                        <div class=”eq_grid post_eq_grid rh-flex-eq-height <?php echo (rehub_option(‘width_layout’) ==’extended’) ? ‘col_wrap_fourth’ : ‘col_wrap_three’;?>”>
                    <?php elseif (rehub_option(‘archive_layout’) == ‘dealgridfull’) : ?>
                        <div class=”eq_grid post_eq_grid rh-flex-eq-height <?php echo (rehub_option(‘width_layout’) ==’extended’) ? ‘col_wrap_fifth’ : ‘col_wrap_fourth’;?>”>
                    <?php else : ?>
                        <div class=””>
                    <?php endif ;?>
        <?php
    }, 50, 2);
    add_action( ‘wcfmmp_store_article_template’, function() {
        error_log(print_r(‘start template’,true));
        ?>
        <?php if (rehub_option(‘archive_layout’) == ‘blog’) : ?>
                                <?php include(rh_locate_template(‘inc/parts/query_type2.php’)); ?>
                            <?php elseif (rehub_option(‘archive_layout’) == ‘newslist’) : ?>
                                <?php $type=’2′; ?>
                                <?php include(rh_locate_template(‘inc/parts/query_type1.php’)); ?>
                            <?php elseif (rehub_option(‘archive_layout’) == ‘communitylist’) : ?>
                                <?php include(rh_locate_template(‘inc/parts/query_type1.php’)); ?>
                            <?php elseif (rehub_option(‘archive_layout’) == ‘deallist’) : ?>
                                <?php include(rh_locate_template(‘inc/parts/postlistpart.php’)); ?>
                            <?php elseif (rehub_option(‘archive_layout’) == ‘grid’ || rehub_option(‘archive_layout’) == ‘gridfull’) : ?>
                                <?php include(rh_locate_template(‘inc/parts/query_type3.php’)); ?>
                            <?php elseif (rehub_option(‘archive_layout’) == ‘columngrid’ || rehub_option(‘archive_layout’) == ‘columngridfull’) : ?>
                                <?php include(rh_locate_template(‘inc/parts/column_grid.php’)); ?>
                            <?php elseif (rehub_option(‘archive_layout’) == ‘cardblog’ || rehub_option(‘archive_layout’) == ‘cardblogfull’) : ?>
                                    <?php include(rh_locate_template(‘inc/parts/color_grid.php’)); ?>
                            <?php elseif (rehub_option(‘archive_layout’) == ‘compactgrid’ || rehub_option(‘archive_layout’) == ‘compactgridfull’) : ?>
                                <?php $gridtype = ‘compact’; include(rh_locate_template(‘inc/parts/compact_grid.php’)); ?>
                            <?php elseif (rehub_option(‘archive_layout’) == ‘dealgrid’ || rehub_option(‘archive_layout’) == ‘dealgridfull’) : ?>
                                <?php include(rh_locate_template(‘inc/parts/compact_grid.php’)); ?>
                            <?php else : ?>
                                <?php include(rh_locate_template(‘inc/parts/query_type1.php’)); ?>
        <?php endif ;?>
        <?php
    });
    add_action( ‘wcfmmp_store_article_template_none’, function() {
        ?>
        <h5><?php _e(‘Descula, sem artigo criado por esse lojista!’, ‘rehub_framework’); ?></h5>
        <?php
    });
    add_action( ‘wcfmmp_after_store_article’, function( $store_id, $store_info ) {
        ?>
      </div></div>
    <div class=”clearfix”>
      <?php
        rehub_pagination();
        echo ‘</div>’;
    }, 50, 2);
    add_filter( ‘wcfm_is_allow_store_articles’, ‘__return_true’ );
    add_filter(‘wcfm_marketplace_settings_fields_visibility’, ‘wcfm_marketplace_settings_fields_visibility2104’, 50, 2 );
    function wcfm_marketplace_settings_fields_visibility2104($general_fields,$vendor_id) {
        unset($general_fields[‘store_hide_map’]);
        return $general_fields;
    }

    However he is skipping the first article and printing the next ones and I can’t find where the problem is

Viewing 1 replies (of 1 total)
  • Plugin Author WC Lovers

    (@wclovers)

    Which theme are you using for the site?

    Between, store article shows only articles added by that vendor, not all site articls.

Viewing 1 replies (of 1 total)
  • The topic ‘Add Article In Seller Store’ is closed to new replies.