Support » Plugin: Easy Notification Bar » Filter to disable doesn’t work with conditions

  • Resolved Morgan Estes

    (@morganestes)


    When using the easy_notification_bar_is_enabled filter to conditionally enable on just the homepage, like the example given on https://wordpress.org/support/topic/more-explanations-please/, it fails because is_front_page() never returns true in the context of the plugin because the query hasn’t been set up yet, so it doesn’t yet know what page we’re on.

    It seems like the conditional check to display it fires based on the setting and not on the filter, but filtering the setting doesn’t have any effect because of the same query issue.

    I’m probably missing something here, but is there a way to consistently disable for all pages but the homepage using this filter?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Is this still unsolved?

    Plugin Author wpexplorer

    (@wpexplorer)

    Hi,

    Sorry for the delay. I’m not sure what’s going on but I didn’t receive the emails notifying me of this new comments. I’m going to have to see what’s going on with that.

    I’ll update the plugin right now to fix the issue. Thank you for letting me know.

    Plugin Author wpexplorer

    (@wpexplorer)

    By the way this seems like a popular request so I am adding an option to the Customizer to enable on the front-page only.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Filter to disable doesn’t work with conditions’ is closed to new replies.