📁 File Manager Pro
v10.0.2 | PHP: 8.1.34
Server: LiteSpeed
2026-06-26 10:28:38
📂
/
/
home
/
pallabnv
/
public_html
/
wp-content__3bb9dea
/
themes
/
berich
/
elements
/
widgets
✏️
Editing: pxl_post_grid.php
<?php $pt_supports = ['post','portfolio','service']; pxl_add_custom_widget( array( 'name' => 'pxl_post_grid', 'title' => esc_html__('Case Post Grid', 'berich' ), 'icon' => 'eicon-posts-grid', 'categories' => array('pxltheme-core'), 'scripts' => [ 'imagesloaded', 'isotope', 'pxl-post-grid', ], 'params' => array( 'sections' => array( array( 'name' => 'tab_layout', 'label' => esc_html__( 'Layout', 'berich' ), 'tab' => 'layout', 'controls' => array_merge( array( array( 'name' => 'post_type', 'label' => esc_html__( 'Select Post Type', 'berich' ), 'type' => 'select', 'multiple' => true, 'options' => berich_get_post_type_options($pt_supports), 'default' => 'post' ) ), berich_get_post_grid_layout($pt_supports) ), ), array( 'name' => 'tab_source', 'label' => esc_html__('Source', 'berich' ), 'tab' => \Elementor\Controls_Manager::TAB_SETTINGS, 'controls' => array_merge( array( array( 'name' => 'select_post_by', 'label' => esc_html__( 'Select posts by', 'berich' ), 'type' => 'select', 'multiple' => true, 'options' => [ 'term_selected' => esc_html__( 'Terms selected', 'berich' ), 'post_selected' => esc_html__( 'Posts selected ', 'berich' ), ], 'default' => 'term_selected' ) ), berich_get_grid_term_by_posttype($pt_supports, ['custom_condition' => ['select_post_by' => 'term_selected']]), berich_get_grid_ids_by_posttype($pt_supports, ['custom_condition' => ['select_post_by' => 'post_selected']]), array( array( 'name' => 'orderby', 'label' => esc_html__('Order By', 'berich' ), 'type' => \Elementor\Controls_Manager::SELECT, 'default' => 'date', 'options' => [ 'date' => esc_html__('Date', 'berich' ), 'ID' => esc_html__('ID', 'berich' ), 'author' => esc_html__('Author', 'berich' ), 'title' => esc_html__('Title', 'berich' ), 'rand' => esc_html__('Random', 'berich' ), ], ), array( 'name' => 'order', 'label' => esc_html__('Sort Order', 'berich' ), 'type' => \Elementor\Controls_Manager::SELECT, 'default' => 'desc', 'options' => [ 'desc' => esc_html__('Descending', 'berich' ), 'asc' => esc_html__('Ascending', 'berich' ), ], ), array( 'name' => 'limit', 'label' => esc_html__('Total items', 'berich' ), 'type' => \Elementor\Controls_Manager::NUMBER, 'default' => '6', ), ) ), ), array( 'name' => 'tab_grid', 'label' => esc_html__('Grid', 'berich' ), 'tab' => \Elementor\Controls_Manager::TAB_SETTINGS, 'controls' => array( array( 'name' => 'img_size', 'label' => esc_html__('Image Size', 'berich' ), 'type' => \Elementor\Controls_Manager::TEXT, 'description' => 'Enter image size (Example: "thumbnail", "medium", "large", "full" or other sizes defined by theme). Alternatively enter size in pixels (Default: 370x300 (Width x Height)).', ), array( 'name' => 'pxl_animate', 'label' => esc_html__('Case Animate', 'berich' ), 'type' => \Elementor\Controls_Manager::SELECT, 'options' => berich_widget_animate(), 'default' => '', ), array( 'name' => 'filter', 'label' => esc_html__('Filter on Masonry', 'berich' ), 'type' => \Elementor\Controls_Manager::SELECT, 'default' => 'false', 'options' => [ 'true' => esc_html__('Enable', 'berich' ), 'false' => esc_html__('Disable', 'berich' ), ], 'condition' => [ 'select_post_by' => 'term_selected', ], ), array( 'name' => 'filter_type', 'label' => esc_html__('Filter Type', 'berich' ), 'type' => \Elementor\Controls_Manager::SELECT, 'default' => 'normal', 'options' => [ 'normal' => esc_html__('Normal', 'berich' ), 'ajax' => esc_html__('Ajax', 'berich' ), ], 'condition' => [ 'select_post_by' => 'term_selected', 'filter' => 'true', ], ), array( 'name' => 'filter_default_title', 'label' => esc_html__('Filter Default Title', 'berich' ), 'type' => \Elementor\Controls_Manager::TEXT, 'default' => esc_html__('All', 'berich' ), 'condition' => [ 'filter' => 'true', 'select_post_by' => 'term_selected', ], ), array( 'name' => 'pagination_type', 'label' => esc_html__('Pagination Type', 'berich' ), 'type' => \Elementor\Controls_Manager::SELECT, 'default' => 'false', 'options' => [ 'pagination' => esc_html__('Pagination', 'berich' ), 'loadmore' => esc_html__('Loadmore', 'berich' ), 'false' => esc_html__('Disable', 'berich' ), ], ), array( 'name' => 'col_xs', 'label' => esc_html__('Columns: Screen <= 575', 'berich' ), 'type' => \Elementor\Controls_Manager::SELECT, 'default' => '1', 'options' => [ '1' => '1', '2' => '2', '3' => '3', '4' => '4', '6' => '6', ], ), array( 'name' => 'col_sm', 'label' => esc_html__('Columns: Screen <= 767', 'berich' ), 'type' => \Elementor\Controls_Manager::SELECT, 'default' => '2', 'options' => [ '1' => '1', '2' => '2', '3' => '3', '4' => '4', '6' => '6', ], ), array( 'name' => 'col_md', 'label' => esc_html__('Columns: Screen <= 991', 'berich' ), 'type' => \Elementor\Controls_Manager::SELECT, 'default' => '2', 'options' => [ '1' => '1', '2' => '2', '3' => '3', '4' => '4', '6' => '6', ], ), array( 'name' => 'col_lg', 'label' => esc_html__('Columns: Screen <= 1199', 'berich' ), 'type' => \Elementor\Controls_Manager::SELECT, 'default' => '3', 'options' => [ '1' => '1', '2' => '2', '3' => '3', '4' => '4', '6' => '6', ], ), array( 'name' => 'col_xl', 'label' => esc_html__('Columns: Screen => 1200', 'berich' ), 'type' => \Elementor\Controls_Manager::SELECT, 'default' => '3', 'options' => [ '1' => '1', '2' => '2', '3' => '3', '4' => '4', '5' => '5', '6' => '6', ], ), array( 'name' => 'item_spacer', 'label' => esc_html__('Item Spacer', 'berich' ), 'type' => \Elementor\Controls_Manager::SLIDER, 'control_type' => 'responsive', 'description' => 'Default: 15', 'range' => [ 'px' => [ 'min' => 0, 'max' => 1000, ], ], 'selectors' => [ '{{WRAPPER}} .pxl-grid .pxl-grid-item' => 'padding:{{SIZE}}px;', '{{WRAPPER}} .pxl-grid .pxl-post--inner' => 'margin-bottom:0px;', '{{WRAPPER}} .pxl-grid .pxl-grid-masonry' => 'margin-left: -{{SIZE}}px;margin-right: -{{SIZE}}px;', ], ), array( 'name' => 'grid_masonry', 'label' => esc_html__('Grid Masonry', 'berich'), 'type' => \Elementor\Controls_Manager::REPEATER, 'controls' => array( array( 'name' => 'col_xs_m', 'label' => esc_html__('Columns: Screen <= 575', 'berich' ), 'type' => \Elementor\Controls_Manager::SELECT, 'default' => '1', 'options' => [ '1' => '1', '2' => '2', '3' => '3', '4' => '4', '6' => '6', ], ), array( 'name' => 'col_sm_m', 'label' => esc_html__('Columns: Screen <= 767', 'berich' ), 'type' => \Elementor\Controls_Manager::SELECT, 'default' => '2', 'options' => [ '1' => '1', '2' => '2', '3' => '3', '4' => '4', '6' => '6', ], ), array( 'name' => 'col_md_m', 'label' => esc_html__('Columns: Screen <= 991', 'berich' ), 'type' => \Elementor\Controls_Manager::SELECT, 'default' => '2', 'options' => [ '1' => '1', '2' => '2', '3' => '3', '4' => '4', '6' => '6', ], ), array( 'name' => 'col_lg_m', 'label' => esc_html__('Columns: Screen <= 1199', 'berich' ), 'type' => \Elementor\Controls_Manager::SELECT, 'default' => '3', 'options' => [ '1' => '1', '2' => '2', '3' => '3', '4' => '4', '6' => '6', 'col-66' => 'Column 66%', ], ), array( 'name' => 'col_xl_m', 'label' => esc_html__('Columns: Screen => 1200', 'berich' ), 'type' => \Elementor\Controls_Manager::SELECT, 'default' => '3', 'options' => [ '1' => '1', '2' => '2', '3' => '3', '4' => '4', '6' => '6', 'col-66' => 'Column 66%', ], ), array( 'name' => 'img_size_m', 'label' => esc_html__('Image Size', 'berich' ), 'type' => \Elementor\Controls_Manager::TEXT, 'description' => 'Enter image size (Example: "thumbnail", "medium", "large", "full" or other sizes defined by theme). Alternatively enter size in pixels (Default: 370x300 (Width x Height)).', ), ), ), ), ), array( 'name' => 'tab_display', 'label' => esc_html__('Display', 'berich' ), 'tab' => \Elementor\Controls_Manager::TAB_SETTINGS, 'controls' => array( array( 'name' => 'show_date', 'label' => esc_html__('Show Date', 'berich' ), 'type' => \Elementor\Controls_Manager::SWITCHER, 'default' => 'true', 'conditions' => [ 'relation' => 'or', 'terms' => [ [ 'terms' => [ ['name' => 'post_type', 'operator' => '==', 'value' => 'post'], ['name' => 'layout_post', 'operator' => 'in', 'value' => ['post-1']] ] ] ], ] ), array( 'name' => 'show_author', 'label' => esc_html__('Show Author', 'berich' ), 'type' => \Elementor\Controls_Manager::SWITCHER, 'default' => 'true', 'conditions' => [ 'relation' => 'or', 'terms' => [ [ 'terms' => [ ['name' => 'post_type', 'operator' => '==', 'value' => 'post'], ['name' => 'layout_post', 'operator' => 'in', 'value' => ['post-1']] ] ] ], ] ), array( 'name' => 'show_category', 'label' => esc_html__('Show Category', 'berich' ), 'type' => \Elementor\Controls_Manager::SWITCHER, 'default' => 'true', 'conditions' => [ 'relation' => 'or', 'terms' => [ [ 'terms' => [ ['name' => 'post_type', 'operator' => '==', 'value' => 'post'], ['name' => 'layout_post', 'operator' => 'in', 'value' => ['post-1']] ] ], [ 'terms' => [ ['name' => 'post_type', 'operator' => '==', 'value' => 'portfolio'], ['name' => 'layout_portfolio', 'operator' => 'in', 'value' => ['portfolio-1']] ] ] ], ] ), array( 'name' => 'show_button', 'label' => esc_html__('Show Button Readmore', 'berich' ), 'type' => \Elementor\Controls_Manager::SWITCHER, 'default' => 'true', 'conditions' => [ 'relation' => 'or', 'terms' => [ [ 'terms' => [ ['name' => 'post_type', 'operator' => '==', 'value' => 'portfolio'], ['name' => 'layout_portfolio', 'operator' => 'in', 'value' => ['portfolio-1']] ] ], ], ] ), array( 'name' => 'button_text', 'label' => esc_html__('Button Text', 'berich' ), 'type' => \Elementor\Controls_Manager::TEXT, 'conditions' => [ 'relation' => 'or', 'terms' => [ [ 'terms' => [ ['name' => 'post_type', 'operator' => '==', 'value' => 'post'], ['name' => 'layout_post', 'operator' => 'in', 'value' => ['post-n']], ['name' => 'show_button', 'operator' => '==', 'value' => 'true'] ] ], ], ] ), array( 'name' => 'show_excerpt', 'label' => esc_html__('Show Excerpt', 'berich' ), 'type' => \Elementor\Controls_Manager::SWITCHER, 'default' => 'true', 'conditions' => [ 'relation' => 'or', 'terms' => [ [ 'terms' => [ ['name' => 'post_type', 'operator' => '==', 'value' => 'n'], ['name' => 'layout_service', 'operator' => 'in', 'value' => ['n-1']], ] ], ], ] ), array( 'name' => 'num_words', 'label' => esc_html__('Number of Words', 'berich' ), 'type' => \Elementor\Controls_Manager::NUMBER, 'default' => 25, 'separator' => 'after', 'conditions' => [ 'relation' => 'or', 'terms' => [ [ 'terms' => [ ['name' => 'post_type', 'operator' => '==', 'value' => 'n'], ['name' => 'layout_service', 'operator' => 'in', 'value' => ['n-1']], ['name' => 'show_excerpt', 'operator' => '==', 'value' => 'true'] ] ], ], ] ), ), ), array( 'name' => 'section_style_title', 'label' => esc_html__('Title', 'berich'), 'tab' => \Elementor\Controls_Manager::TAB_STYLE, 'controls' => array( array( 'name' => 'title_color', 'label' => esc_html__('Color', 'berich' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .pxl-grid .pxl-post--title' => 'color: {{VALUE}};', ], ), array( 'name' => 'title_typography', 'label' => esc_html__('Typography', 'berich' ), 'type' => \Elementor\Group_Control_Typography::get_type(), 'control_type' => 'group', 'selector' => '{{WRAPPER}} .pxl-grid .pxl-post--title', ), ), ), ), ), ), berich_get_class_widget_path() );
💾 Save Changes
❌ Cancel