WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [Plugin: The Events Calendar] Phone number not displaying on event (4 posts)

  1. Greg Dyer
    Member
    Posted 4 years ago #

    Hi All,

    I input a phone contact number for an event, but it only shows in the calendar event list...not in the event, or blog post?

    anyone else?

    Start:
    April 30, 2010 7:00 AM
    End:
    May 2, 2010 7:00 AM
    Cost:
    Registration fee

    Venue:
    Special Event - Sports
    Address:
    Google Map
    Gilchrist Park, Punta Gorda, United States, 33950

    Thanks,

    Greg

  2. Shane Pearlman
    Modern Tribe
    Posted 4 years ago #

    Good Catch,

    I'll add an issue.

    -S

  3. justinendler
    Member
    Posted 4 years ago #

    Hi Greg,

    This is fixed for version 1.6 coming up. To do it now, find the file single.php and search for this bit of code:

    <?php if(the_event_venue()) : ?>
       <dt><?php _e('Venue:', $spEvents->pluginDomain) ?></dt>
       <dd><?php echo the_event_venue(); ?></dd>
    <?php endif; ?>

    Directly below that, insert:

    <?php if(the_event_phone()) : ?>
       <dt><?php _e('Phone:', $spEvents->pluginDomain) ?></dt>
       <dd><?php echo the_event_phone(); ?></dd>
     <?php endif; ?>

    That displays the phone number in post view. Phone info does not appear in the main loop of blog posts by design. You'll see there is no event info except the description in the loop. To get phone in there, insert the same code from above anywhere in the loop, but feed the_event_phone() the post id, something like:

    <?php if(the_event_phone( $post->ID )) : ?>
       <dt><?php _e('Phone:', $spEvents->pluginDomain) ?></dt>
       <dd><?php echo the_event_phone( $post->ID ); ?></dd>
     <?php endif; ?>

    Justin

  4. Greg Dyer
    Member
    Posted 4 years ago #

    THX!

Topic Closed

This topic has been closed to new replies.

About this Topic