sorting feature added and readme text update

This commit is contained in:
magepeopleteam 2018-09-18 08:18:33 +00:00
parent d056fda216
commit 81d85b8012
2 changed files with 24 additions and 6 deletions

View File

@ -18,7 +18,6 @@ const myEvents = [
);
$loop = new WP_Query($args_search_qqq);
$i = 1;
$count = $loop->post_count-1;
@ -69,6 +68,7 @@ function mep_event_list($atts, $content=null){
"org-filter" => "no",
"show" => "-1",
"pagination" => "no",
'sort' => 'ASC'
);
$params = shortcode_atts($defaults, $atts);
@ -79,6 +79,7 @@ function mep_event_list($atts, $content=null){
$org_f = $params['org-filter'];
$show = $params['show'];
$pagination = $params['pagination'];
$sort = $params['sort'];
ob_start();
?>
<div class='mep_event_list'>
@ -129,6 +130,9 @@ if($cat>0){
'post_type' => array( 'mep_events' ),
'paged' => $paged,
'posts_per_page' => $show,
'order' => $sort,
'orderby' => 'meta_value',
'meta_key' => 'mep_event_start_date',
'tax_query' => array(
array(
'taxonomy' => 'mep_cat',
@ -144,6 +148,9 @@ elseif($org>0){
'post_type' => array( 'mep_events' ),
'posts_per_page' => $show,
'paged' => $paged,
'order' => $sort,
'orderby' => 'meta_value',
'meta_key' => 'mep_event_start_date',
'tax_query' => array(
array(
'taxonomy' => 'mep_org',
@ -156,9 +163,12 @@ elseif($org>0){
}
else{
$args_search_qqq = array (
'post_type' => array( 'mep_events' ),
'post_type' => array( 'mep_events' ),
'paged' => $paged,
'posts_per_page' => $show
'posts_per_page' => $show,
'order' => $sort,
'orderby' => 'meta_value',
'meta_key' => 'mep_event_start_date'
);
}

View File

@ -3,7 +3,7 @@ Contributors: magepeopleteam
Tags: event, woocomerce events manager, events manager, Wordpress Events plugin, Events plugin, wp events
Requires at least: 4.5
Stable tag: 2.1
Version: 2.1.2
Version: 2.1.3
Tested up to: 4.9
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
@ -62,7 +62,7 @@ All major functions are available below:
### Shortcodes included with Woocommerce Events Manager
##### **[event-list cat='' org='' style='grid' cat-filter='no' org-filter='no' show='' pagination='no']**
##### **[event-list cat='' org='' style='grid' cat-filter='no' org-filter='no' show='' pagination='no' sort='ASC']**
**cat:**
By default showing all event, but if you want to show event list of a particular category you can use this attribute, just put the category id with this. example: _**[event-list cat='ID']**_
@ -85,6 +85,11 @@ By default showing all event without any limition. If you want to change it and
**pagination:**
By default there is no pagination with the event list but if you want to show pagination set yes the value. example: _**[event-list pagination='yes']**_
**sort:**
You can sort event list by event start datetime. By default it showing as Assending format, If you want to change the sorting format you need you use this attribute. example: _**[event-list sort='ASC/DESC']**_
### Event Calender ShortCode:
[event-calendar]
@ -178,3 +183,6 @@ You can display the event list on any page by using the ShortCode. Just use this
= 2.1.3 =
*Update Release, Date display issue fixed. 14 Sep 2018*
= 2.1.4 =
*Update Release, Sorting feture added into shortcode. 18 Sep 2018*