Plugin Directory

Changeset 2007581


Ignore:
Timestamp:
01/07/2019 09:35:31 AM (7 years ago)
Author:
albreis
Message:

Add fields 'order' and 'orderby' to set posts ordering

Location:
albnet-shortcodes/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • albnet-shortcodes/trunk/README.txt

    r2007577 r2007581  
    145145
    1461461.1.4 Fix bug that not show content
     147
     1481.1.5 Add fields 'order' and 'orderby' to set posts ordering
  • albnet-shortcodes/trunk/albnet-shortcodes.php

    r2007577 r2007581  
    1212 * Plugin URI: https://shortcodes.albreis.com.br
    1313 * Description: A lot of shortcodes to show posts
    14  * Version: 1.1.4
     14 * Version: 1.1.5
    1515 * Author: Albreis Network <[email protected]>
    1616 * Author URI: https://albreis.com.br
     
    9191        // Current page
    9292        'paged' => '',
     93
     94        // Posts ordering
     95        'order' => 'ASC',
     96
     97        // Field to ordering
     98        'orderby' => 'ID',
    9399
    94100        // Show pagination? Only if "paged" is set
     
    210216    }
    211217
     218    /**
     219     * Set posts ordering
     220     */
     221    $args['order'] = $a['order'];
     222    $args['orderby'] = $a['orderby'];
     223
    212224    return $args;
    213225}
Note: See TracChangeset for help on using the changeset viewer.