Add time to modified events list

This topic contains 10 replies, has 2 voices, and was last updated by  Stephen Harris 8 years, 1 month ago.

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #25272

    Hi Stephen,

    A few weeks ago you help me modify my event list… ref https://gist.github.com/stephenharris/6636882

    Everything is fine except I wanted to time added also, so you ref
    eo_the_start() with time-placeholders (see http://codex.wp-event-<br />
    organiser.com/function-eo_the_start.html)

    how would it look if I needed the time for the event?

    eo_the_start( $format = ‘m-d-Y’, $post_id=5, $occurrence_id, $deprecated ) something like this? where is the time parameter?

    Thanks
    Mel

    Mel Fisher
    #25277

    There is no time parameter, the $format argument is just the desired format of the returned date-time string. You can just use time placeholders if you want the time only (e.g. G:ia).

    See the php documentation for all the available placeholders.

    Stephen Harris
    #25290

    Hi Stephen,

    I am not very technical so if I use the follow function:

    eo_the_start( $format = ‘g:ia’, $post_id, $occurrence_id, $deprecated )

    where would this go if I wanted to show the time on the eo-events-widget CSS that you gave me and is working fine…

    Thanks again…
    Mel

    btw: I upgraded to the Developers version and am working with a vendor to use ur plugin in a slider…..

    Mel Fisher
    #25300

    where on the widget do you want to display the time?

    Stephen Harris
    #25304

    Hi Stephen,

    On the top line right after the event title, the description can start on the next line. Or where ever you think looks best..

    Thank You
    Mel

    Mel Fisher
    #25309

    Try:

    <strong>
        <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" ><?php the_title(); ?></a>
    </strong>
    <div>
        <?php eo_the_start( 'g:ia' ); ?>
    </div>
    

    (time formats placeholders can be found here: http://php.net/manual/en/function.date.php)

    Stephen Harris
    #25312

    Hi,

    1. is this the line to edit?
      event-organiser/includes/event-organiser-event-functions.php – line 348

    2. where does the code go?

    function eo_the_start( $format = ‘d-m-Y’, $post_id = 0, $occurrence_id = 0, $deprecated = 0 ) { echo eo_get_the_start( $format, $post_id, $occurrence_id, $deprecated );
    }

    /**
    * Returns the end date of occurrence of event.

    Mel Fisher
    #25332
    1. No, you’ll want to edit the template file widget-event-list.php (the one you added to your theme from here.

    2. You shouldn’t add that – it’s already in the plugin.

    Stephen Harris
    #25333

    Hi Stephen,

    ok I will edit the new widget file I added before…

    I looked at the template and am not sure where to add it… I tried a few places but it was not the correct place….

    What line in the template file?

    Sorry I am not a coder….

    Thanks
    Mel

    Mel Fisher
    #25334

    Hii,

    I figured it out…. Thank you for your patience!

    Mel

    Mel Fisher
    #25344

    Glad you found it 😀

    Stephen Harris
Viewing 11 posts - 1 through 11 (of 11 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.