WordPress.org

Ready to get started?Download WordPress

Forums

Event-O-Matic
[resolved] Widget disappearing when no events listed (3 posts)

  1. delflux
    Member
    Posted 1 year ago #

    I noticed that the widget isn't active when no events are listed. How would we edit the widget to still display but instead of making the widget inactive have it display "No upcoming events"?

    http://wordpress.org/extend/plugins/event-o-matic/

  2. Matthew
    Member
    Plugin Author

    Posted 1 year ago #

    There isn't an easy way to do this within the administrator - like many wordpress widget formats, if there is no content, the widget will not display. If you'd like to modify this behavior, alter your sidebar to check for content within the widget and display other content if none is found.

  3. delflux
    Member
    Posted 1 year ago #

    I figured out a solution. Just added an else statement to the widget function.

    else {
    echo $before_widget.$before_title.$instance['title'].$after_title;
    echo '<p>No upcoming events</p>';
    }

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags