Advertisement
palsushobhan

wcfm-store-page-article-tab-besa-theme

Jun 7th, 2023
563
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.84 KB | None | 0 0
  1. add_action( 'wcfmmp_before_store_article', function( $store_id, $store_info ) {
  2.     $sidebar_configs = besa_tbay_get_blog_layout_configs();
  3.     $blog_columns = apply_filters( 'loop_blog_columns', 1 );
  4.     $columns    = $blog_columns;
  5.     if(isset($blog_columns) && $blog_columns >= 3) {
  6.         $screen_desktop         = 3;
  7.         $screen_desktopsmall    = 2;
  8.         $screen_tablet          = 2;
  9.     } else {
  10.         $screen_desktop         = $blog_columns;
  11.         $screen_desktopsmall    = $blog_columns;
  12.         $screen_tablet          = $blog_columns;
  13.     }
  14.     $screen_mobile              = 1;
  15.     $data_responsive = ' data-xlgdesktop='. $columns .'';
  16.     $data_responsive .= ' data-desktop='. $screen_desktop .'';
  17.     $data_responsive .= ' data-desktopsmall='. $screen_desktopsmall .'';
  18.     $data_responsive .= ' data-tablet='. $screen_tablet .'';
  19.     $data_responsive .= ' data-mobile='. $screen_mobile .'';
  20.  
  21.     ?>
  22.     <div id="main-content" class="<?php echo esc_attr($sidebar_configs['main']['class']); ?>" style="margin: 0 30px;">
  23.         <div id="main" class="site-main layout-blog">
  24.             <?php do_action( 'besa_post_template_main_content_before' ); ?>
  25.             <div class="row grid" <?php echo $data_responsive; ?>
  26.     <?php
  27. }, 50, 2);
  28.  
  29. add_action( 'wcfmmp_store_article_template', function() {
  30.     $skin = besa_tbay_get_theme();
  31.     get_template_part( 'post-formats/'.$skin.'/content', get_post_format() );
  32. });
  33.  
  34. add_action( 'wcfmmp_store_article_template_none', function() {
  35.     $skin = besa_tbay_get_theme();
  36.     get_template_part( 'post-formats/'.$skin.'/content', 'none' );
  37. });
  38.  
  39. add_action( 'wcfmmp_after_store_article', function( $store_id, $store_info ) {
  40.     echo '</div>';
  41.     do_action( 'besa_post_template_main_content_after' );
  42.     echo '</div>';
  43.     echo '</div>';
  44. }, 50, 2);
  45.  
  46. add_filter( 'wcfm_is_allow_store_articles', '__return_true' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement