majeedraza1 / carousel-slider

A WordPress plugin to Create SEO friendly Image, Logo, Video, Post, WooCommerce Product and HTML Content Carousel.
https://wordpress.org/plugins/carousel-slider/
Other
12 stars 4 forks source link

Feature: add possibility to sort posts by publication date #21

Closed elhaus closed 1 year ago

elhaus commented 2 years ago

Hi @sayful1, thank you very much for this great plugin.

I would like to ask you to add the possibility to sort posts by publication date.

I have already prepared the code for this /modules/PostCarousel/Admin.php - line 161

array(
    'id'      => '_post_orderby',
    'name'    => esc_html__( 'Order by', 'carousel-slider' ),
    'std'     => 'ID',
    'options' => array(
        'none'          => esc_html__( 'No order', 'carousel-slider' ),
        'ID'            => esc_html__( 'Post id', 'carousel-slider' ),
        'author'        => esc_html__( 'Post author', 'carousel-slider' ),
        'title'         => esc_html__( 'Post title', 'carousel-slider' ),
        'modified'      => esc_html__( 'Last modified date', 'carousel-slider' ),
        'date'          => esc_html__( 'Publication date', 'carousel-slider' ),           // Added this line
        'rand'          => esc_html__( 'Random order', 'carousel-slider' ),
        'comment_count' => esc_html__( 'Number of comments', 'carousel-slider' ),
    ),
)
elhaus commented 1 year ago

Already fixed see https://github.com/sayful1/carousel-slider/commit/710fe14ce66bfa9f0ce09f6abcf4bbea05af8b75