WordPress.org

Ready to get started?Download WordPress

Forums

Events Manager
[resolved] Remove cancelled events from tables (5 posts)

  1. chrishylton2012
    Member
    Posted 2 years ago #

    I don't want the user to be able to see events they've already cancelled. I've tried to do this in my-bookings.php by adding the following php, but it doesn't work:

    <?php if ($EM_Booking->status != 3) ?>
    <tr>
    .....
    </tr>
    <?php endif; ?>

    But this causes the entire table to mysteriously disappear :P Hah. If someone knows how please let me know!

    http://wordpress.org/extend/plugins/events-manager/

  2. agelonwl
    Member
    Posted 2 years ago #

    hi,

    try this one; I think your just missing ":"

    <?php if ($EM_Booking->status != 3): ?>
    <tr>
    .....
    </tr>
    <?php endif; ?>
  3. chrishylton2012
    Member
    Posted 2 years ago #

    Thanks! That solved it! I really need to learn php markup :P

  4. stuureenswatnaarhugo
    Member
    Posted 1 year ago #

    Hi chrishylton2012,

    Could you post your my-bookings.php file? Can't figure out how you did it!

    Many thanks!

    Hugo

  5. stuureenswatnaarhugo
    Member
    Posted 1 year ago #

    Sorry chrishylton2012, solved it myself:

    my-bookings.php

    changed line 60
    if( ($rowno < $limit || empty($limit)) && ($event_count >= $offset || $offset === 0) ) {
    to
    if( ($rowno < $limit || empty($limit)) && ($event_count >= $offset || $offset === 0) && $EM_Booking->status != 3) {

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.