New to PHP, what calls inside the loop?

WordPress Event Management, Calendars & Registration Forums General Question New to PHP, what calls inside the loop?

This topic contains 3 replies, has 2 voices, and was last updated by  Stephen Harris 11 years, 9 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #4079

    Hello, great plugin, exactly what I am looking for and I will be purchasing the pro plugin as soon as it is available.

    To explain I am a total newbie to PHP as I consider myself a frontend designer, however I really want to get the most from this plugin as it is exactly what I am after. I have been reading the documentation but it is not clicking just yet.

    I know I have wrongly used a shortcode to show the event details on the event-single page, and it is showing ALL the start dates for ALL events and the event times.

    I have been using shortcodes inside the loop, can you let me know what calls I should be using?

    <?php echo do_shortcode('[eo_events]%start{jS F Y}%[/eo_events]'); ?>

    <?php echo do_shortcode('[eo_events]%start{g:i:a}% - %end{g:i:a}%[/eo_events]'); ?>

    Looking forward to the Pro version!

    Many thanks

    Ross
    #4275

    Hi Ross,

    The shortcode is for listing events. To display an event’s date/time you can use eo_get_the_start().(see docs and examples)

    Stephen Harris
    #4284

    Thank you very much, I used the following code and its showing great:

    <?php echo eo_get_the_start('g:i:a'); ?> - <?php echo eo_get_the_end('g:i:a'); ?>

    One last question is that I would like to show a ‘custom field’ that has been added to the event post, how would I do that?

    Thanks in advance:)
    Ross

    Ross Gosling
    #4285

    No worries 🙂

    Events are just a post ype, so you can use the usual WordPress functions ( see http://codex.wordpress.org/Function_Reference/get_post_meta )

    Stephen Harris
Viewing 4 posts - 1 through 4 (of 4 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.