Programming event list
-
Hi Barry thanks for responding to my personal email and as requested have brought it to the forum.
I have got this far:
function sie_events(){
$thisDate = date(“Y-m-d”);
$thisDate7 = date(“Y-m-d”,strtotime(“+1 week”));$event_posts = event_embed()->obtain( [
‘from’ => $thisDate,
‘to’ => $thisDate7
] );
echo($thisDate . ” to “. $thisDate7 . “
“);
// Now you can iterate through the results and do // whatever you like
foreach ( $event_posts as $single_event ) {
$url = get_permalink( $single_event->ID );
$title = get_the_title( $single_event->ID );
echo ‘event: ‘ . $title . ‘‘;}
}
add_shortcode(‘SiE_Events’, ‘sie_events’);I do get the echo of the date come up: 2015-05-12 to 2015-05-19 but no events to which I know there is at least 25 for the date period.
I’d also like to add start date to the event.Thanks in advance
- The topic ‘Programming event list’ is closed to new replies.