I want to show the posts my users have added in three different sections. That would be "Your Posts from This week" and so on. I am currently using:

add_action( 'elementor/query/currentuser', function( $query ) {
    if ( is_user_logged_in() ){
        $query->set( 'author', get_current_user_id() );
} );

to display posts by current logged in users. But any idea what I can add to this query to also display posts from current week/month/year?

PS: Sorry for my week English, it is not my first language :)

  • You will have to open a ticket with Elementor to ensure you get an answer that is compatible with their code base. Mar 11, 2022 at 18:52
  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer.
    – Community Bot
    Mar 11, 2022 at 18:52


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.