Home › Forums › Calendar Products › Events Calendar PRO › Day Limit doesn't work
- This topic has 2 replies, 2 voices, and was last updated 10 years, 3 months ago by Barry.
-
AuthorPosts
-
February 2, 2014 at 1:21 am #99720bernhardprangeParticipant
Hi there,
I made this template to show on my start-page:
<!– TRIBE EVENTS begin –>
<?phpglobal $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!
February 4, 2014 at 6:35 am #100465BarryMemberHi @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!
February 18, 2014 at 7:14 am #105913BarryMemberI’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!
-
AuthorPosts
- The topic ‘Day Limit doesn't work’ is closed to new replies.