• Resolved mars1

    (@mars1)


    Hello all,

    I love this plugin and I have one question.

    For event listing sidebar widget, could we set it like only show 5 events?

    Since I add total 36 events for a whole month, I only want it to list most 5 current events based on the day of today.

    Is it possible? Please help.
    Thank you so much for your time.

    http://wordpress.org/extend/plugins/event-registration/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author avdude

    (@avdude)

    While I am not an expert and have not tried this, in the file er_wideget. Look at line 32:
    $sql = “SELECT * FROM ” . get_option(‘events_detail_tbl’) .” WHERE str_to_date(start_date, ‘%Y-%m-%e’) >= curdate() ORDER BY str_to_date(start_date, ‘%Y-%m-%e’)”;

    Change to $sql = “SELECT * FROM ” . get_option(‘events_detail_tbl’) .” WHERE str_to_date(start_date, ‘%Y-%m-%e’) >= curdate() ORDER BY str_to_date(start_date, ‘%Y-%m-%e’) LIMIT 5″;

    I think that will do it, or at least set you on the right path.

    Sorry but busy with other issues to test myself.

    Thread Starter mars1

    (@mars1)

    Hello,

    Thanks a lot. It is working great now.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Event Registration] Event Listing Sidebar Widget Listing Question’ is closed to new replies.