Filtering list by current month

Home Forums Calendar Products Events Calendar PRO Filtering list by current month

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1291393
    Dominik Schneider
    Participant

    Hi there,

    I’m using the list loop template (views/list/loop.php) to get a list of events (based on the PostPerPage Limit I have set in the settings).

    But now, I want to give this list some arguements, to filter this list manually by etc. current month, or post per page limit. The structure is this:

    <?php
    $current_month = date('M');
    query_posts(array('post_type' => 'tribe_events', 'posts_per_page' => 10, 'month' => $current_month));
    ?>
    <?php while (have_posts()) : the_post(); ?>
    <?php the_title(); ?>
    <?php endwhile; ?>

    However, this is not working. Someone has an idea, how to realize this?

    Thank you!

    #1292633
    Victor
    Member

    Hi Dominik!

    I’d be happy to help you with this!

    First off, I do want to note that we are fairly limited in how much we can support custom development questions like this.

    That said, I’d be happy to at least point you in the right direction as best I can.

    Where are you exactly placing that code in the loop.php template ? Are you making a template override? Perhaps you could share with me the complete code in the template so I can take a look and even try it for myself. Let me know about it.

    In addition, let me point you to a couple of articles that explain the use of custom event queries and the tribe_get_events() function.

    Best,
    Victor

     

    #1297103
    Dominik Schneider
    Participant

    Hey, thank you for your message. I could solve the problem, with the article link you have sent me.

    Thanks!

    #1297131
    Victor
    Member

    Right on Dominik! I’m so glad to hear you could work it out!

    I appreciate you following up to let us know. Definitely keep us posted if any other questions come up and we’d be happy to help.

    Cheers!
    Victor

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Filtering list by current month’ is closed to new replies.