Join our new community forum for support & discussion

Join Now

Home Support Themes RentalHive How to enable Account menu items that are ‘inactive’

How to enable Account menu items that are ‘inactive’

  • Author
    Posts
  • flantascience

    I notice that in the Account menu, some items only show when they are ‘active’ for a user. For example, “Messages” only appears after a user receives a message and “Bookings” only appears after a user has created a booking. Is there a way to for certain links to be active (or inactive)?

    ihor developer

    If you mean showing the Messages menu item & page even if there are no conversations it’s possible, but requires code customizations. Currently there’s a condition in the code that checks if there’s at least 1 conversation.

    flantascience

    Can you tell me where that code is that specifies the requirement for at least one convo? Is it the same for only showing the page if there is a booking?

    ihor developer

    Yes, you can check this condition here https://github.com/hivepress/hivepress-messages/blob/master/includes/components/class-message.php#L379 The menu item is added only if there’s at least 1 message. The same redirect restriction is set for the page itself https://github.com/hivepress/hivepress-messages/blob/master/includes/controllers/class-message.php#L249

Viewing 4 posts - 1 through 4 (of 4 total)

New Reply

This forum has been archived and is no longer accepting new posts or replies. Please join our new community forum for support & discussion.