Disable user to delete listing

WordPress Business Themes Forums Responsive Themes Coupon Theme Disable user to delete listing

Disable user to delete listing

January 23, 2017
 abu

  • abu
    Newbie 12 points

    Hello, when a user submits a listing and then view that listing, they are shown an alert saying:

    Listing Author – Delete – Edit This Listing.

    How can disable all users the ability to edit or delete their listing only admin should be able to edit or delete.

    Thanks.

    January 23, 2017 at 8:57 pm
  • Josh
    Josh
    Super Guru 13,887 points

    Hello Abu,
    Please add below code under Theme Setup >General Setup >Custom css

    #editlistingbox {
    display: none;
    }

    January 24, 2017 at 1:57 pm

  • abu
    Newbie 12 points

    I want to able to disallow edit and delete for other than admin. There is also an option to edit or delete from the profile page.

    How can I disable globally using php not css?

    Thanks

    January 24, 2017 at 3:14 pm
  • Josh
    Josh
    Super Guru 13,887 points

    Hello Abu,
    Try below code under Theme Setup >General Setup >Custom CSS >Footer Styles


    <script>
    if (!jQuery(".logged-in")[1]){
    jQuery('#editlistingbox,.hidden_grid a').hide();
    }
    </script>

    January 25, 2017 at 4:55 pm

  • abu
    Newbie 12 points

    This isn’t what I’m looking for, I’m thinking more of user permissions. I have created a feature request thread, hope you guys will consider it.

    January 25, 2017 at 10:40 pm
  • Josh
    Josh
    Super Guru 13,887 points

    Hello Abu,
    You can use the [MEMBERSHIP] shortcode to hide content
    >>http://www.premiumpress.com/docs/#MEMBERSHIP

    January 26, 2017 at 2:48 pm

  • abu
    Newbie 12 points

    Thank you for that, what are the user levels? What do the numbers mean? Which number is subscirber?

    January 26, 2017 at 2:54 pm
  • Josh
    Josh
    Super Guru 13,887 points

    The numbers represent your Membership Package ID.Which you can get under Listing Setup >Membership Package >ID

    January 26, 2017 at 3:45 pm

  • abu
    Newbie 12 points

    That won’t work for me, I want to disable delete and edit site wide for everybody except admin that means, subscribers etc can only post. Any way to do that?

    January 26, 2017 at 4:16 pm
  • Josh
    Josh
    Super Guru 13,887 points

    The code I provided above works perfectly

    January 26, 2017 at 4:41 pm

  • abu
    Newbie 12 points

    Thanks for the reply Josh.
    Anyone can turn off javascript and bypass that bit of jquery. If it can be done with php that would be great.

    January 26, 2017 at 4:51 pm

  • Na
    Newbie 54 points

    The jQuery disables both “edit and delete listing”. If I only need to disable “delete listing”. what is the jQuery?

    November 6, 2017 at 9:43 am
  • Josh
    Josh
    Super Guru 13,887 points

    Hello Na,
    Please try below cod under Theme Setup >General Setup >Custom css

    .logged-in #editlistingbox a:first-child {
    display:none;
    }

    November 6, 2017 at 12:15 pm

  • Na
    Newbie 54 points

    I copied your code, but failed to disable the delete button, then I rewrote it step by step, still failed. Is there anything wrong?

    November 7, 2017 at 8:24 am
  • Josh
    Josh
    Super Guru 13,887 points

    Hello Na,
    Send in a ticket I will do this for you

    November 7, 2017 at 12:15 pm
Viewing 15 posts - 1 through 15 (of 21 total)

Didn't find what you were after?

Chat with us now

or contact our support team