hypnotiqart

Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • hypnotiqart
    Participant

    I tried putting your code in page.php, but it still does not work. Can I privately send you the file so that you can see what I’m doing wrong?

    // Ensure the global $post variable is in scope
    global $post;

    // Retrieve the next 5 upcoming events
    $events = tribe_get_events( array(
    ‘posts_per_page’ => 5,
    ‘start_date’ => new DateTime()
    ) );

    // Loop through the events: set up each one as
    // the current post then use template tags to
    // display the title and content
    foreach ( $events as $post ) {
    setup_postdata( $post );

    // This time, let’s throw in an event-specific
    // template tag to show the date after the title!
    the_title();
    echo tribe_get_start_date();
    the_content();
    }

    hypnotiqart
    Participant

    Thanks Geoff!
    Last dumb question. Does it go in the header area or somewhere else?

    Thanks

    hypnotiqart
    Participant

    Thanks for your quick response Geoff,

    Where do I put the code you mentioned. Can you please let me know where in the theme or specifically where I should put the code you mentioned?

    hypnotiqart
    Participant

    This reply is private.

Viewing 4 posts - 1 through 4 (of 4 total)