Support » Plugins » [Plugin: The Events Calendar] Phone number not displaying on event

  • Resolved Greg Dyer

    (@gdyer911)


    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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Shane Pearlman

    (@shanepearlman)

    Modern Tribe

    Good Catch,

    I’ll add an issue.

    -S

    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

    THX!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: The Events Calendar] Phone number not displaying on event’ is closed to new replies.