Hide the add listing button for regular user

I found this code in gist:

body:not(.logged-in) .hp-menu--site-header .hp-menu__item--listing-submit{
  display: none;
}

This is for any user, how about only admins? is that possible using css?

Hi,

Sorry, there’s no simple code snippet for this, it would require a custom implementation. If customizations beyond the available features are required for your site, please consider hiring someone for custom work https://fvrr.co/32e7LvY

Hi, as I saw you changed the title I think it was misinterpreted.

What I want to achieve is no one except administrators can you the add listing buttons.

So
non logged-in cannot add listing,
users cannot add listings,

host and administrator can add listings. (therefore the they can see the button)

Is this possible?

Hi,

Sorry for the confusion. Please use this PHP snippet (How to add custom code snippets - HivePress Help Center):

Very much appreciated Andrii, thanks.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.