Show product field only to logged in uysres

Discussion in 'RoadFighter WordPress Theme' started by smarta, Nov 6, 2016.

Tags:
Thread Status:
Not open for further replies.
  1. smarta

    smarta Member

    Joined:
    Jul 20, 2012
    Messages:
    225
    Likes Received:
    4
    I am trying to add some custom CSS to hide a custom woo-commerce field from users that are not logged in

    I know it is not a theme support request - it's just you guys are so helpful I though I would ask anyway

    My client want to add a 'Staff Notes" field to his products so only his loogged in staff can see them
    currently the site is in catalog mode and will stay that way for some time - so there is no need for anyone to be logged in part from his staff

    I found this page where is specifies how to hide fields from non-logged in users

    I have created a custom field using the plug in WC Field plug in

    I have used the following CSS

    body.logged-in .staff_notes { display: inline-block !important; }

    but it still seems to display when the user is not logged

    any suggestions?
     
  2. smarta

    smarta Member

    Joined:
    Jul 20, 2012
    Messages:
    225
    Likes Received:
    4
    I realised I only had half the code needed (see below for what i have now) but it still does not work

    .staff_notes { display: none !important; }
    body.logged-in .staff_notes { display: inline-block !important; }
     
  3. Naveen

    Naveen Guest

    Joined:
    Aug 8, 2014
    Messages:
    1,739
    Likes Received:
    64
    Hello Smarta,

    It seems you need to hide some fields but, I would like to inform you that, this is not a part of the theme.

    It's a part of the plugin and we can do it for you at a small price.

    Let me know if you agree.

    Warm Regards!
    Naveen Kolhe
    InkThemes.com
     
  4. smarta

    smarta Member

    Joined:
    Jul 20, 2012
    Messages:
    225
    Likes Received:
    4
    that is correct

    I have a custom, text field in woo commerce products called "staff-notes"

    it is cvor straff emmebres to add notes about the product that only the other staff can see

    I want to hide this field from everybody except for people logged in

    hopefully logged in as "admin" level if that is possible

    can you let me know the exact cost before I ask you to proceed

    you san email me privately at [email protected]
     
  5. Naveen

    Naveen Guest

    Joined:
    Aug 8, 2014
    Messages:
    1,739
    Likes Received:
    64
    I just sent you an email, please check.
     
  6. smarta

    smarta Member

    Joined:
    Jul 20, 2012
    Messages:
    225
    Likes Received:
    4
    no need - I worked out a way to do it
     
  7. Naveen

    Naveen Guest

    Joined:
    Aug 8, 2014
    Messages:
    1,739
    Likes Received:
    64
    That sounds great :)
     
Thread Status:
Not open for further replies.

Share This Page