Plugin Directory

Changeset 2955577

Timestamp:
08/18/2023 11:29:21 PM (11 months ago)
Author:
mdshuvo
Message:

version 3.4.0 released

Location:
ajax-filter-posts
Files:
57 added
2 edited

Legend:

Unmodified
Added
Removed
  • ajax-filter-posts/trunk/ajax-filter-posts.php

    r2872592 r2955577  
    11<?php
    22/**
    3  * Plugin Name:  Post Grid Ajax
     3 * Plugin Name: 
    44 * Plugin URI:   http://addonmaster.com
    55 * Author:       AddonMaster
    6  * Author URI:   http://addonmaster.com/plugins/post-grid-with-ajax-filter
    7  * Version:      3.3.0
    8  * Description:  Post Grid with Ajax Filter helps you filter your posts by category terms with Ajax. Infinite scroll function included.
     6 * Author URI:   http
     7 * Version:      3..0
     8 * Description:  .
    99 * License:      GPL2
    1010 * License URI:  https://www.gnu.org/licenses/gpl-2.0.html
    11  * Text Domain:  ajax-filter-posts
     11 * Text Domain: 
    1212 * Domain Path:  /lang
    1313 */
    1414
    15 /**
    16 * Including Plugin file for security
    17 * Include_once
    18 *
    19 * @since 1.0.0
    20 */
    21 include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
    22 
    23 // Defines
    24 define('AM_POST_GRID_VERSION', '3.3.0');
    25 
    26 /**
    27 * Loading Text Domain
    28 */
    29 add_action('plugins_loaded', 'am_post_grid_plugin_loaded_action', 10, 2);
    30 function am_post_grid_plugin_loaded_action() {
    31     load_plugin_textdomain( 'ajax-filter-posts', false, dirname( plugin_basename(__FILE__) ) . '/lang/' );
     15if ( ! defined( 'ABSPATH' ) ) {
     16    exit;
    3217}
    3318
    3419
    3520/**
    36  *  Admin Page
     21 *
    3722 */
    38 //require_once( dirname( __FILE__ ) . '/inc/admin/admin-page.php' );
     23final class GridMasterPlugin {
     24
     25    /**
     26     * Class construcotr
     27     */
     28    private function __construct() {
     29        // Define constants
     30        $this->define_constants();
     31
     32        // Enqueue scripts and styles.
     33        add_action( 'wp_enqueue_scripts', array( $this, 'scripts' ), 999 );
     34
     35        register_activation_hook( __FILE__, [ $this, 'activate' ] );
     36
     37        // Plugin init
     38        add_action( 'plugins_loaded', [ $this, 'init_plugin' ] );
     39
     40        // Action link
     41        add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), array( $this, 'action_links' ) );
     42
     43        // Admin Functions
     44        if ( is_admin() ) {
     45            $this->admin_init();
     46        }
     47    }
     48
     49    /**
     50     * Initializes a singleton instance
     51     */
     52    public static function init() {
     53        static $instance = false;
     54
     55        if ( ! $instance ) {
     56            $instance = new self();
     57        }
     58
     59        return $instance;
     60    }
     61
     62    /**
     63     * Define the required plugin constants
     64     *
     65     * @return void
     66     */
     67    public function define_constants() {
     68
     69        define( 'GRIDMASTER_VERSION', '3.4.0' );
     70        define( 'GRIDMASTER_FILE', __FILE__ );
     71        define( 'GRIDMASTER_PATH', __DIR__ );
     72        define( 'GRIDMASTER_URL', plugins_url( '', GRIDMASTER_FILE ) );
     73        define( 'GRIDMASTER_ASSETS', GRIDMASTER_URL . '/assets/' );
     74        // if ( ! defined( 'GRIDMASTER_PRO_PATH' ) ) {
     75        //     define( 'GRIDMASTER_PRO_PATH', plugin_dir_path( __DIR__ ) . 'gridmaster-pro' );
     76        // }
     77        // if ( ! defined( 'GRIDMASTER_PRO_ASSETS_URL' ) ) {
     78        //     define( 'GRIDMASTER_PRO_ASSETS_URL', plugins_url('gridmaster-pro') . '/assets' );
     79        // }
     80        define( 'GRIDMASTER_PRO_LINK', 'https://addonmaster.com/gridmaster/' );
     81
     82    }
     83
     84    // Admin Functions
     85    public function admin_init() {
     86        if ( !class_exists( 'GridMaster\Admin' ) ) {
     87            require_once GRIDMASTER_PATH . '/admin/Admin.php';
     88        }
     89        $gridmaster = GridMaster\Admin::init();
     90    }
     91
     92    /**
     93     * Initialize the plugin
     94     *
     95     * @return void
     96     */
     97    public function init_plugin() {
     98
     99        // Load Localization
     100        load_plugin_textdomain( 'gridmaster', false, dirname( plugin_basename( __FILE__ ) ) . '/lang' );
     101       
     102        // Include the functions.php
     103        require_once GRIDMASTER_PATH . '/inc/functions.php';
     104       
     105        // Load Shortcode Class
     106        if ( !class_exists( 'GridMaster\Shortcode' ) ) {
     107            require_once GRIDMASTER_PATH . '/inc/Shortcode.php';
     108        }
     109        $shortcode = GridMaster\Shortcode::init();
     110
     111    }
    39112
    40113
    41 // Enqueue scripts
    42 function am_ajax_filter_posts_scripts(){
     114    /**
     115     * Do stuff upon plugin activation
     116     *
     117     * @return void
     118     */
     119    public function activate() {
     120        // Save timestamp for plugin activation
     121        update_option( 'gridmaster_activation_time', time() );
     122    }
    43123
    44     // CSS File
    45     wp_enqueue_style( 'asrafp-styles', plugin_dir_url( __FILE__ ) . 'assets/css/post-grid-styles.css', null, AM_POST_GRID_VERSION );
     124    /**
     125     * Enqueue scripts and styles
     126     *
     127     * @return void
     128     */
     129    public function scripts() {
    46130
    47     // JS File
    48     wp_register_script( 'asr_ajax_filter_post', plugin_dir_url( __FILE__ ) . 'assets/js/post-grid-scripts.js', array('jquery'), AM_POST_GRID_VERSION );
    49     wp_enqueue_script( 'asr_ajax_filter_post' );
     131        wp_enqueue_script( 'gridmaster-frontend', GRIDMASTER_ASSETS . 'frontend.js', array( 'jquery' ), GRIDMASTER_VERSION, true );
    50132
    51     // Localization
    52     wp_localize_script( 'asr_ajax_filter_post', 'asr_ajax_params', array(
    53             'asr_ajax_nonce' => wp_create_nonce( 'asr_ajax_nonce' ),
    54             'asr_ajax_url' => admin_url( 'admin-ajax.php' ),
    55         )
    56     );
     133        // Localization
     134        wp_localize_script( 'gridmaster-frontend', 'asr_ajax_params', array(
     135            'asr_ajax_nonce' => wp_create_nonce( 'asr_ajax_nonce' ),
     136            'asr_ajax_url' => admin_url( 'admin-ajax.php' ),
     137        ) );
     138
     139
     140        wp_enqueue_style( 'gridmaster-frontend', GRIDMASTER_ASSETS . 'css/frontend.css', array(), GRIDMASTER_VERSION );
     141
     142    }
     143
     144    /**
     145     * Add action links
     146     *
     147     * @param  array $links
     148     * @return array
     149     */
     150    public function action_links( $links ) {
     151        $links[] = '<a href="' . esc_url( admin_url( 'admin.php?page=gridmaster' ) ) . '">' . __( 'Settings', 'gridmaster' ) . '</a>';
     152        // Get GridMaster Pro
     153        if( !gridmaster_is_pro() ) {
     154            $links[] = '<a href="' . gridmaster_website_url( 'gridmaster/free-vs-pro/' ) . '" target="_blank" style="color: #39b54a; font-weight: bold;">' . __( 'Get GridMaster Pro', 'gridmaster' ) . '</a>';
     155        }
     156        return $links;
     157    }
     158
    57159}
    58160
    59 add_action( 'wp_enqueue_scripts', 'am_ajax_filter_posts_scripts' );
    60 
    61 //shortcode function
    62 function am_post_grid_shortcode_mapper( $atts, $content = null ) {
    63 
    64     // Posts per pages.
    65     $posts_per_page = ( get_option( 'posts_per_page', true ) ) ? get_option( 'posts_per_page', true ) : 9;
    66 
    67     // Default attributes
    68     $shortcode_atts = shortcode_atts(
    69             array(
    70                 'show_filter'       => "yes",
    71                 'btn_all'           => "yes",
    72                 'initial'           => "-1",
    73                 'layout'            => '1',
    74                 'post_type'         => 'post',
    75                 'posts_per_page'    => $posts_per_page,
    76                 'cat'               => '',
    77                 'terms'             => '',
    78                 'paginate'          => 'no',
    79                 'hide_empty'        => 'true',
    80                 'orderby'           => 'menu_order date', //Display posts sorted by ‘menu_order’ with a fallback to post ‘date’
    81                 'order'             => 'DESC',
    82                 'pagination_type'   => '',
    83                 'infinite_scroll'   => '',
    84                 'animation'         => '',
    85                 'grid_id'           => '', // master ID
    86             ),
    87             $atts
    88         );
    89 
    90     // Params extraction
    91     extract($shortcode_atts);
    92 
    93     ob_start();
    94 
    95     // Texonomy arguments
    96     $taxonomy = 'category';
    97     $args = array(
    98         'hide_empty' => $hide_empty,
    99         'taxonomy' => $taxonomy,
    100         'include' => $terms ? $terms : $cat,
    101     );
    102 
    103     // Get category terms
    104     $terms = get_terms($args); ?>
    105     <div class="am_ajax_post_grid_wrap" data-pagination_type="<?php echo esc_attr($pagination_type); ?>" data-am_ajax_post_grid='<?php echo json_encode($shortcode_atts);?>'>
    106 
    107         <?php if ( $show_filter == "yes" && $terms && !is_wp_error( $terms ) ){ ?>
    108             <div class="asr-filter-div" data-layout="<?php echo $layout; ?>"><ul>
    109                 <?php if($btn_all != "no"): ?>
    110                     <li class="asr_texonomy" data_id="-1"><?php echo esc_html('All','ajax-filter-posts'); ?></li>
    111                 <?php endif; ?>
    112                 <?php foreach( $terms as $term ) { ?>
    113                     <li class="asr_texonomy" data_id="<?php echo $term->term_id; ?>"><?php echo $term->name; ?></li>
    114                 <?php } ?>
    115             </ul></div>
    116         <?php } ?>
    117 
    118         <div class="asr-ajax-container">
    119             <div class="asr-loader">
    120                 <div class="lds-dual-ring"></div>
    121             </div>
    122             <div class="asrafp-filter-result">
    123                 <?php echo am_post_grid_output( am_post_grid_get_args_from_shortcode_atts($shortcode_atts) ); ?>
    124             </div>
    125         </div>
    126     </div>
    127 
    128     <?php return ob_get_clean();
    129 }
    130 add_shortcode('asr_ajax','am_post_grid_shortcode_mapper');
    131 add_shortcode('am_post_grid','am_post_grid_shortcode_mapper');
    132 
    133 // Get Args from Json Data
    134 function am_post_grid_get_args_from_shortcode_atts( $jsonData ){
    135 
    136     if( isset( $jsonData['posts_per_page'] ) ){
    137         $data['posts_per_page'] = intval( $jsonData['posts_per_page'] );
    138     }
    139 
    140     if( isset( $jsonData['orderby'] ) ){
    141         $data['orderby'] = sanitize_text_field( $jsonData['orderby'] );
    142     }
    143 
    144     if( isset( $jsonData['order'] ) ){
    145         $data['order'] = sanitize_text_field( $jsonData['order'] );
    146     }
    147 
    148     if( isset( $jsonData['pagination_type'] ) ){
    149         $data['pagination_type'] = sanitize_text_field( $jsonData['pagination_type'] );
    150        
    151     }
    152 
    153     if( isset( $jsonData['animation'] ) && $jsonData['animation'] == "true" ){
    154         $data['animation'] = 'am_has_animation';
    155     }
    156 
    157     if( isset( $jsonData['infinite_scroll'] ) && $jsonData['infinite_scroll'] == "true" ){
    158         $data['infinite_scroll'] = 'infinite_scroll';
    159     }
    160 
    161     // Bind to Category Terms
    162     $terms =  '';
    163     if ( isset( $jsonData['cat'] ) && !empty( $jsonData['cat'] ) ) {
    164         $terms = explode(',', $jsonData['cat']);
    165     } elseif ( isset( $jsonData['terms'] ) && !empty( $jsonData['terms'] ) ) {
    166         $terms = explode(',', $jsonData['terms']);
    167     }
    168 
    169    
    170     // Tax Query
    171     if ( !empty( $terms ) ) {
    172         $data['tax_query'] = [
    173             'category' => $terms,
    174         ];
    175     }
    176 
    177     return $data;
     161// Initializes the main plugin
     162function GridMasterPlugin() {
     163    return GridMasterPlugin::init();
    178164}
    179165
    180 // Load Posts Ajax actions
    181 add_action('wp_ajax_asr_filter_posts', 'am_post_grid_load_posts_ajax_functions');
    182 add_action('wp_ajax_nopriv_asr_filter_posts', 'am_post_grid_load_posts_ajax_functions');
    183 
    184 // Load Posts Ajax function
    185 function am_post_grid_load_posts_ajax_functions(){
    186     // Verify nonce
    187     // if( !isset( $_POST['asr_ajax_nonce'] ) || !wp_verify_nonce( $_POST['asr_ajax_nonce'], 'asr_ajax_nonce' ) )
    188     // die('Permission denied');
    189 
    190     $data = [];
    191 
    192     $term_ID = isset( $_POST['term_ID'] ) ? sanitize_text_field( intval($_POST['term_ID']) ) : '';
    193 
    194     // Pagination
    195     if( $_POST['paged'] ) {
    196         $dataPaged = intval($_POST['paged']);
    197     } else {
    198         $dataPaged = get_query_var('paged') ? get_query_var('paged') : 1;
    199     }
    200 
    201     $jsonData = json_decode( str_replace('\\', '', $_POST['jsonData']), true );
    202    
    203     // Merge Json Data
    204     $data = array_merge( am_post_grid_get_args_from_shortcode_atts( $jsonData ), $data );
    205 
    206     // Current Page
    207     if ( isset( $_POST['paged'] ) ) {
    208         $data['paged'] = sanitize_text_field( $_POST['paged'] );
    209     }
    210 
    211     // Selected Category
    212     if ( !empty( $term_ID ) && $term_ID != -1 ) {
    213         $data['tax_query'] = [
    214             'category' => [$term_ID],
    215         ];
    216     }
    217 
    218     // Output
    219     echo am_post_grid_output( $data );
    220 
    221     die();
    222 }
    223 
    224 // Post Grid
    225 function am_post_grid_output( $args = [] ){
    226 
    227     // Parse Args
    228     $args = wp_parse_args( $args, [
    229         'post_type' => 'post',
    230         'post_status' => 'publish',
    231         'paged' => get_query_var('paged') ? get_query_var('paged') : 1,
    232         'posts_per_page' => '',
    233         'orderby' => '',
    234         'order' => '',
    235         'layout' => '1',
    236         'pagination_type' => '',
    237         'animation' => '',
    238         'infinite_scroll' => '',
    239         'tax_query' => [
    240             'category' => []
    241         ],
    242     ]);
    243 
    244     // Post Query Args
    245     $query_args = array(
    246         'post_type' => 'post',
    247         'post_status' => 'publish',
    248         'paged' => $args['paged'],
    249     );
    250 
    251 
    252     // If json data found
    253     if ( !empty( $args['posts_per_page'] ) ) {
    254         $query_args['posts_per_page'] = intval( $args['posts_per_page'] );
    255     }
    256 
    257     if ( !empty( $args['orderby'] ) ) {
    258         $query_args['orderby'] = sanitize_text_field( $args['orderby'] );
    259     }
    260 
    261     if ( !empty( $args['order'] ) ) {
    262         $query_args['order'] = sanitize_text_field( $args['order'] );
    263     }
    264    
    265 
    266     // Pagination Type
    267     $pagination_type = sanitize_text_field( $args['pagination_type'] );
    268     $dataPaged = sanitize_text_field( $args['paged'] );
    269 
    270 
    271     // Tax Query Var
    272     $tax_query = [];
    273 
    274     // Check if has terms
    275     if( !empty( $args['tax_query'] ) && is_array( $args['tax_query'] ) ) {
    276         foreach ( $args['tax_query'] as $taxonomy => $terms ) {
    277             if ( !empty( $terms ) ) {
    278                 $tax_query[] =[
    279                     'taxonomy' => $taxonomy,
    280                     'field' => 'term_id',
    281                     'terms' => $terms,
    282                 ];
    283             }
    284            
    285         }
    286     }
    287 
    288     // Tax Query
    289     if ( !empty( $tax_query ) ) {
    290         $query_args['tax_query'] = $tax_query;
    291     }
    292    
    293 
    294     //post query
    295     $query = new WP_Query( $query_args );
    296     ob_start();
    297 
    298     // Wrap with a div when infinity load
    299     echo ( $pagination_type == 'load_more' ) ? '<div class="am-postgrid-wrapper">' : '';
    300 
    301     // Start posts query
    302     if( $query->have_posts() ): ?>
    303 
    304         <div class="<?php echo esc_attr( "am_post_grid am__col-3 am_layout_{$args['layout']} {$args['animation']} " ); ?>">
    305        
    306         <?php while( $query->have_posts()): $query->the_post(); ?>
    307 
    308             <?php if($args['layout'] == "1"){ ?>
    309             <div class="am_grid_col">
    310                 <div class="am_single_grid">
    311                     <div class="am_thumb">
    312                         <?php the_post_thumbnail('full'); ?>
    313                     </div>
    314                     <div class="am_cont">
    315                         <a href="<?php echo get_the_permalink(); ?>"><h2 class="am__title"><?php echo get_the_title(); ?></h2></a>
    316                         <div class="am__excerpt">
    317                             <?php echo wp_trim_words( get_the_excerpt(), 15, null ); ?>
    318                         </div>
    319                         <a href="<?php echo get_the_permalink(); ?>" class="am__readmore"><?php echo esc_html__('Read More','ajax-filter-posts');?></a>
    320                     </div>
    321                 </div>
    322             </div>
    323             <?php } else if( $args['layout'] == 2 ){ ?>
    324             <?php } ?>
    325 
    326         <?php endwhile; ?>
    327         </div>
    328 
    329         <div class="am_posts_navigation">
    330         <?php
    331             $big = 999999999; // need an unlikely integer
    332             $dataNext = $dataPaged+1;
    333 
    334             $paged = ( get_query_var( 'paged' ) ) ? absint( get_query_var( 'paged' ) ) : 1;
    335 
    336             $paginate_links = paginate_links( array(
    337                 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
    338                 'format' => '?paged=%#%',
    339                 'current' => max( 1, $dataPaged ),
    340                 'prev_next' => false,
    341                 'mid_size' => 2,
    342                 'total' => $query->max_num_pages
    343             ) );
    344 
    345             // Load more button
    346             if( $pagination_type == 'load_more' ){
    347 
    348                 if( $paginate_links && $dataPaged < $query->max_num_pages ){
    349                     echo "<button type='button' data-paged='{$dataPaged}' data-next='{$dataNext}' class='{$args['infinite_scroll']} am-post-grid-load-more'>" . esc_html__( 'Load More', 'ajax-filter-posts' )."</button>";
    350                 }
    351 
    352             } else {
    353 
    354                 // Paginate links
    355                 echo "<div id='am_posts_navigation_init'>{$paginate_links}</div>";
    356             }
    357 
    358         ?>
    359         </div>
    360 
    361         <?php
    362     else:
    363         esc_html_e('No Posts Found','ajax-filter-posts');
    364     endif;
    365     wp_reset_query();
    366 
    367     // Wrap close when infinity load
    368     echo ( $pagination_type == 'load_more' ) ? '</div>' : '';
    369 
    370     // Echo the results
    371     return ob_get_clean();
    372 }
    373 
    374 
    375 /**
    376  * Add plugin action links.
    377  *
    378  * @since 1.0.0
    379  * @version 4.0.0
    380  */
    381 function am_ajax_post_grid_plugin_action_links( $links ) {
    382     $plugin_links = array(
    383         '<a href="'.admin_url( 'admin.php?page=ajax-post-grid' ).'">' . esc_html__( 'Options', 'ajax-filter-posts' ) . '</a>',
    384     );
    385     return array_merge( $plugin_links, $links );
    386 }
    387 //add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), 'am_ajax_post_grid_plugin_action_links' );
    388 
     166// run the plugin
     167GridMasterPlugin();
    389168
    390169/**
     
    407186
    408187appsero_init_tracker_ajax_filter_posts();
     188
     189
     190
     191
     192
     193
     194
     195
  • ajax-filter-posts/trunk/readme.txt

    r2872592 r2955577  
    1 === Post Grid Ajax ===
     1=== ===
    22Contributors: mdshuvo, addonmaster, mdashikul
    33Tags: infinite scroll, post grid, grid, post type grid, pagination, ajax pagination, grid display, filter, filtering, grid, layout, post, post filter, post layout, taxonomy, taxonomy filter,ajax grid, displaypost gridpost, type grid, wp post frid, ajax post filter, filter post ajax, ajaxify, mixitup, isotop, category filter, filter without reload, ajax filter, ajax plugin
    4 Tested up to: 6.1.1
    5 Stable tag: 3.3.0
     4Tested up to: 6.
     5Stable tag: 3..0
    66License: GPLv2 or later
    77License URI: http://www.gnu.org/licenses/gpl-2.0.html
    8 Post Grid with Ajax Filter plugin is a simple WordPress plugin that helps you filter your post by category terms with Ajax including Infinite scroll. Ajax post grid will help you Load posts with grid layout and you can also filter by post category.
     8
     9Gridmaster helps you to create post grid with ajax filter. You can create grid layout with taxonomy filter, pagination, load more button, infinite scroll, and many more.
    910
    1011== Description ==
    11 Post Grid Ajax plugin is a simple, clean, and easy to use WordPress plugin that helps you filter your post by category terms with Ajax including Infinite scroll. Ajax post grid will help you Load posts with grid layout and you can also filter by post category.
    12 
    13 Just use below shortcodes anywhere. Below you can see all available shortcodes.
     12.
     13
     14.
    1415
    1516<iframe width="560" height="315" src="https://www.youtube.com/embed/8Th_jp8YEk4" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
    1617
    17 ### [See the Live demo](http://plugins.addonmaster.com/post-grid-with-ajax-filter/)
    18 
    19 ###Features
    20 * Shortcodes for showing anywhere
    21 * Load More Button
    22 * Infinite Scroll
    23 * Animate on Post load
    24 * Pre-Build Layout
    25 * Grid Layout
    26 * Ajax Post Grid
    27 * Category Filter with ajax
    28 * Controlling Options
    29 * Post pagination
    30 * Show/Hide Specific category terms
    31 
    32 ## Shortcodes
    33 * Default Shortcode
    34 <pre>[am_post_grid]</pre>
    35 
    36 * Control for Show or Hide the filter
    37 Options: yes,no
    38 Default: yes
    39 <pre>[am_post_grid show_filter="no"]</pre>
    40 
    41 * Control Number of Posts Per Page
    42 Options: Integers, -1 for all posts
    43 Default: WordPress Default
    44 <pre>[am_post_grid posts_per_page="6"]</pre>
    45 
    46 * Post pagination
    47 Options: yes,no
    48 Default: "yes"
    49 <pre>[am_post_grid posts_per_page="6" paginate="yes"]</pre>
    50 
    51 * Show/Hide "All" Button before filter
    52 Options: yes,no
    53 Default: "yes"
    54 <pre>[am_post_grid btn_all="yes"]</pre>
    55 
    56 * Show/Hide Specific Category Terms
    57 Options: 1,2,3,4
    58 Default: ""
    59 <pre>[am_post_grid cat="100,101,103"]</pre>
    60 or
    61 <pre>[am_post_grid terms="100,101,103"]</pre>
    62 
    63 * Hide/Show Empty Category Terms
    64 Options: true, false
    65 Default: "true"
    66 <pre>[am_post_grid hide_empty="false"]</pre>
    67 
    68 * Post Order
    69 Options: ASC, DESC
    70 Default: "DESC"
    71 <pre>[am_post_grid order="DESC"]</pre>
    72 
    73 * Post Orderby
    74 Default: 'menu_order date', //Display posts sorted by ‘menu_order’ with a fallback to post ‘date’
    75 <pre>[am_post_grid orderby="title"]</pre>
    76 
    77 Here is the full documentation for post order/orderby: [Order & Orderby Parameters](https://developer.wordpress.org/reference/classes/wp_query/#order-orderby-parameters)
    78 
    79 * Pagination Type: Load More button or Paginate Links
    80 Options: "",load_more
    81 Default: ""
    82 <pre>[am_post_grid pagination_type="load_more"]</pre>
    83 
    84 
    85 * Infinite Scroll (Works only for pagination_type="load_more" attributes )
    86 Options: "",true
    87 Default: ""
    88 <pre>[am_post_grid infinite_scroll="true"]</pre>
    89 
    90 
    91 * Animation effect
    92 Options: "",true
    93 Default: ""
    94 <pre>[am_post_grid animation="true"]</pre>
    95 
     18### [See the Live demo](https://plugins.addonmaster.com/gridmaster/)
     19
     20###Features of Gridmaster
     21Gridmaster offers you a lot of features that will help you to create a post grid with ajax filter easily. You can develope your custom theme templates easily by using the Gridmaster shortcode. Here are some of the features that you will get with Gridmaster.
     22
     23**Shortcode Generator**
     24Gridmaster has a shortcode generator that helps you to generate the shortcode easily and you can use the shortcode anywhere to show the post grid. You can also use the shortcode in your theme template file. It has a preview shortcode feature that helps you to preview the post grid before using the shortcode.
     25
     26**Pre-Build Grid Layout**
     27Gridmaster has few pre-build post grid layouts (more are coming) that you can use to create your post grid. It has some unique classes that you can use to create your own layout easily using CSS.
     28
     29**Custom Post Type Support**
     30We are not only supporting the default post type but also supporting the custom post type. You can create a post grid with any custom post type.
     31
     32**Posts Per Page**
     33Gridmaster offers you to control the number of posts per page. You can show all posts or you can show a specific number of posts per page.
     34
     35**Order By/Order**
     36Gridmaster offers you to control the order of the post. You can order the post by date, title, menu order, random, comment count, ID, author, and more. You can also order the post in ascending or descending order.
     37
     38**Excerpt Length**
     39Gridmaster offers you to control the excerpt length. You can control the excerpt length by the number of words. You can also choose from where you want to get the content (excerpt or content).
     40
     41**Read More Button**
     42Gridmaster offers you to hide or show the read more button in the post grid. You can also change the read more button text.
     43
     44**Filter Style**
     45Gridmaster has 3 filter styles that you can use to show the filter. You can also hide the filter and show post grid only. You can also show the filter without the "All" button.
     46
     47**Custom Taxonomy Support**
     48Gridmaster offers you to create a custom taxonomy filter. You can create a custom taxonomy filter and show the post grid based on the taxonomy. You can also show selected category terms only in the filter.
     49
     50**Ajax Pagination**
     51Gridmaster has ajax pagination that helps you to load the next page without reloading the page. It has 2 types of pagination. You can use the default pagination or you can use the load more button.
     52
     53**Load More Button**
     54It has a load more button that helps you to load the next page posts grid with a button click.
     55
     56**Infinite Scroll**
     57It also has infinite scroll that helps you to load the next page post grid when you scroll down the page. Using this feature you can load the next page post grid without clicking any button.
     58
     59**Animate on Post load**
     60Gridmaster has an animation effect that helps you to animate the post when the post loads.
     61
     62**Grid Image Thumbnail Size**
     63Gridmaster offers you to control the image thumbnail size. You can choose the image thumbnail size from the available image sizes.
     64
     65
     66###Other Features
     67* **Works with Any Theme:** Gridmaster works with any WordPress theme. You can use it with any theme.
     68* **Seamless Efficiency with Clean Code:** Gridmaster is developed with clean code and it is optimized for speed and performance. We don't clutter your frontend with backend code. GridMaster maintains a lean codebase for optimal site performance.
     69* **Responsive:** Gridmaster is fully responsive and it works perfectly on all devices.
     70* **Cross Browser Compatible:** Gridmaster is cross-browser compatible. It works perfectly with all the major browsers.
     71* **Translation Ready:** Gridmaster is translation ready. You can translate it easily.
     72* **Well Documented:** Gridmaster is well documented. It has step by step documentation that helps you to use it easily.
     73* **Essential Features at No Cost:** GridMaster comes packed with nearly all necessary features as part of its free package, ensuring exceptional value.
     74
     75**Still have questions?**
     76If you have any questions or queries regarding Gridmaster, you can ask them in the [support forum](https://wordpress.org/support/plugin/ajax-filter-posts/) or [contact us](https://addonmaster.com/submit-a-ticket/). We will try to answer your questions as soon as possible.
     77
     78
     79### Pro Features
     80There are some pro features that you will get with the pro version of Gridmaster. Here are some of the pro features.
     81
     82**Pro Filter Style**
     83Gridmaster has 3 filter styles in the free version. But with the pro version, you will get few more filter styles.
     84
     85**Pro Grid Layout**
     86Gridmaster has few pre-build post grid layouts in the free version. But with the pro version, you will get few more grid layouts.
     87
     88**Taxonomy Image and Color**
     89Gridmaster has a taxonomy image and color feature that helps you show the taxonomy image and color in the filter. You can also show the taxonomy image and color in the post grid.
     90
     91**Auto Select Taxonomy**
     92Auto select taxonomy is a pro feature that helps you to select the taxonomy automatically when you visit the taxonomy page. You will need to use the shortcode in the taxonomy template file to use this feature.
     93
     94**Custom Taxonomy Terms**
     95By default Gridmaster shows all the taxonomy terms in the filter. But with the pro version, you can show selected taxonomy terms only in the filter.
     96
     97**Initial Term on Page Load**
     98This feature helps you to show the post grid based on the initial term on page load. You can use this feature to show the post grid based on the initial term on page load.
     99
     100**Auto-Select Initial Term**
     101This feature helps you to auto-select the initial term when you visit the term page. The shortcode needs to be used in the taxonomy template file to use this feature.
     102
     103**Allow Multiple Selection**
     104Gridmaster has a multiple selection feature that helps you to show post grid based on the selected terms. You can select more than one term and show the post grid based on the selected terms.
     105
     106**Auto Post Type Selection**
     107This feature helps you to select the post type automatically when you visit the post type page. You will need to place the shortcode in the post type template file to use this feature.
     108
     109**Heading Tag**
     110This feature helps you to change the heading tag of the post title. You can change the heading tag from h1 to h6, div, span, p.
     111
     112**Heading Font Size**
     113This feature helps you to change the font size of the post title. You can set the font size for different devices.
     114
     115**Column Gap Control**
     116Gridmaster has a column gap control feature that helps you to control the column gap of the post grid.
     117
     118**Row Gap Control**
     119Gridmaster has a row gap control feature that helps you to control the row gap of the post grid.
     120
     121**Post Items Per Row**
     122Gridmaster has a post items per row feature that helps you to control the number of post items per row. You can select different post items per row for different devices.
     123
     124= More feature coming soon... =
    96125
    97126
     
    106135
    107136== Installation ==
    108 1. Upload "ajax-filter-posts.zip\" to the "/wp-content/plugins/" directory.
    109 2. Activate the plugin through the "Plugins" menu in WordPress.
     1371. Download and unzip the plugin. Upload the unzipped folder to the wp-contents/plugins folder of your WordPress installation.
     1382. Active the plugin from the WordPress Plugins administration page.
     1393. OR, Go to WP admin panel, click 'Plugins' -> 'Add new'. In the search input box, type 'Gridmaster'.
     1404. Install and activate the plugin.
     1415. That's it. From dashboard go to Gridmaster menu and create your first post grid.
    110142
    111143== Frequently Asked Questions ==
    112 = How to use it? =
    113 use this shortcode: [am_post_grid]
    114 
    115 = Why the plugin is not working? =
    116 Please post details on support forum.
     144= How to create a post grid? =
     145Go to Gridmaster menu from the dashboard. Then click on the "Grid Builder" tab. Then select the available options (filter type, post grid style, post type, etc) and then copy the shortcode and paste it where you want to show the post grid.
     146
     147= Will it work with my theme? =
     148Yes, it will work with any standard WordPress theme. If you face any problem, please let us know.
     149
     150= Will it work with any page builder? =
     151Yes, it will work with any standard page builder. Just copy the shortcode and paste it where you want to show the post grid.
     152
     153= Can I use multiple post grids on the same page? =
     154Yes, you can use multiple post grids on the same page.
     155
     156= Will it slow down my website? =
     157No, it will not slow down your website. It is developed with clean code and it is optimized for speed and performance.
     158
     159
     160= Can I create a post grid with custom taxonomy? =
     161Yes, you can create a post grid with any custom taxonomy.
     162
     163= How to create a post grid with custom taxonomy? =
     164From the Grid Builder tab, select the "Show Filter" option. Then select the taxonomy from the "Select Taxonomy" option. Then select the terms from the "Terms" option. Then select the other available options. Then copy the shortcode and paste it where you want to show the post grid.
     165
     166= Can I create a post grid with custom post type? =
     167Yes, you can create a post grid with any custom post type.
     168
     169= Can I hide the filter? =
     170Yes, you can hide the filter from the post grid.
     171
     172= Is it possible to show the post grid without the "All" button? =
     173Yes, you can show the post grid without the "All" button.
     174
     175= Can I paginate the post grid with Load More Button? =
     176Yes, you can paginate the post grid with the Load More Button.
     177
     178= Can I paginate the post grid with Infinite Scroll? =
     179Yes, you can paginate the post grid with Infinite Scroll.
     180
     181= Can I change the read more button text? =
     182Yes, you can change the read more button text.
    117183
    118184= I need help with custom feature? =
    119 email me at addonmasterwp@gmail.com
     185If you need any custom feature, please let us know. We will try to add the feature in the next update. Some features will be added in the pro version only. Email us at [addonmasterwp@gmail.com](mailto:addonmasterwp@gmail.com) for any custom feature request.
    120186
    121187
     
    126192
    127193== Changelog ==
     194
     195
     196
     197
     198
     199
     200
     201
     202
     203
     204
     205
     206
     207
     208
     209
     210
     211
     212
     213
    128214
    129215= 3.3.0 =
Note: See TracChangeset for help on using the changeset viewer.