Day Limit doesn't work

Home Forums Calendar Products Events Calendar PRO Day Limit doesn't work

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #99720
    bernhardprange
    Participant

    Hi there,
    I made this template to show on my start-page:
    <!– TRIBE EVENTS begin –>
    <?php

    global $post;
    $current_date = date(‘j M Y’);
    $end_date = date(‘j M Y’, strtotime(‘1 days’));
    $all_events = tribe_get_events(
    array(
    ‘eventDisplay’=>’upcoming’,
    ‘posts_per_page’=>99,
    ‘start_date’=>$current_date,
    ‘end_date’=>$end_date,
    )
    );

    foreach($all_events as $post) {
    setup_postdata($post);
    ?>

    <div class=”row events-list-item”>
    <div class=”col-xs-12 col-sm-3 pull-left”>
    “><?php the_post_thumbnail(‘full’, array(‘class’ => ‘img-circle img-responsive ‘)); ?>
    </div>

    <div class=”col-xs-12 col-sm-9 pull-left”>
    <h3 >“><?php the_title(); ?></h3>
    <p><?php echo tribe_get_start_date($post->ID, true, ‘l j.m.y’); ?> @ <?php echo tribe_get_venue_link() ?></p>
    <?php the_excerpt(); ?>
    </div>

    </div>
    <?php } //endforeach ?>
    <?php wp_reset_query(); ?>
    <!– TRIBE EVENTS end –>

    The problem is, that the day-limit won’t work. The result ist only limited post_per_page. Is that code old 2.0 code I copied? Please help!

    #100465
    Barry
    Member

    Hi @bernhardprange,

    Generally speaking we can’t help with custom code, I’m afraid. If you do need to share code though please use a service like Pastebin, Gist or Dropbox as the forum is unfortunately prone to modifying and stripping out pieces of code here and there.

    The problem is, that the day-limit won’t work. The result ist only limited post_per_page. Is that code old 2.0 code I copied? Please help!

    So though I can see your post_per_page clause (great that part is working!) no additional code to limit things per day is jumping out at me. The only other comment I would make is that you should probably pass in your start and end dates in Y-m-d format rather than j M Y.

    All in all it may be best to take an issue like this to a freelance developer who will be able to give you the level of assistance you need here.

    Thanks and good luck!

    #105913
    Barry
    Member

    I’ll go ahead and close this thread, but if we can help with anything else please don’t hesitate to create new threads as needed. Thanks!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Day Limit doesn't work’ is closed to new replies.