Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1021542
    hjaffer
    Participant

    Hi X

    Any idea how how show only yesterday’s posts (or posts from the last days) in essential grid? I was playing with the additional filters field of essential grid’s source settings without any luck.

    Appreciate your support

    Thanks

    #1021810
    Lely
    Moderator

    Hi There,

    Thanks for posting in.
    Please check this link for custom order:https://www.themepunch.com/faq/grid-custom-order/
    Then refer to this link for date filters:https://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters

    Hope this helps.

    #1024227
    hjaffer
    Participant

    Thanks Lely. I saw both links before I ask here but I just don’t know how get them to work for my requirement. Are you able to help me with that?

    Thanks

    #1024594
    Joao
    Moderator

    Hi There,

    After you choose the numbers of posts you want to be shown you can add

    order=DESC&orderby=date

    in your additional paramerts box and it will show the most recent posts.

    Hope that helps,

    Joao

    #1024710
    hjaffer
    Participant

    Thanks Joao. That at least gives an idea. When I said I want to show yesterday’s posts, I meant yesterday, literally, only posts written one day backward and no more. Is this possible?

    #1025304
    Rad
    Moderator

    Hi there,

    It’s possible with date_query, example,

    $args = array(
        'date_query' => array(
            array(
                'column' => 'post_date_gmt',
                'before' => '1 day ago'
            )
        )
    );

    But array value isn’t possible within that parameter input.

    Please try this,

    orderby=date&date_query[column]=post_date_gmt&date_query[before]=1 day ago

    Though, I can’t guarantee that. Thanks!

    #1026417
    hjaffer
    Participant

    Thanks Rad

    The orderby=date&date_query[column]=post_date_gmt&date_query[before]=1 day ago bit didn’t work. How would tell WordPress to target essential grid by id in the date_query example?

    Thanks

    #1026690
    Rupok
    Member

    Hi there,

    Thanks for updating. That would be a bit complex as we don’t know about ES Grid since it’s not managed by Themeco. Further customizations from here would be getting into custom development, which is outside the scope of support we can offer. If you need more in depth changes, you may wish to consult with a developer. X is quite extensible with child themes, so there are plenty of possibilities. Thanks for understanding.

  • <script> jQuery(function($){ $("#no-reply-1021542 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>