[Resolved] Change topbar text by user role

Home Forums Support [Resolved] Change topbar text by user role

Home Forums Support Change topbar text by user role

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1112847
    Shawn

    Hi,

    So this one is a bit tricky. The client has 2 different free shipping minimums. 1 for customer role, the other for wholesale. They’d like that in the topbar but there are a couple of problems. They don’t want one role seeing the other’s minimum. Also, putting both in topbar takes up too much space on mobile.

    So, is there any way to specify the information shown per role?
    I had thought of using the WooCommerce store notice to show only wholesale but can’t figure out how to only display that to a single role.

    #1113348
    David
    Staff
    Customer Support

    Hi there,

    you could use a Hook Element to display the content based on User Role.
    Check the Display Rules > Users to see if the ‘wholesale customer’ role is visible.

    https://docs.generatepress.com/article/hooks-element-overview/

    If it is then Try the before_header hook to add your message HTML. And simply create a new hook for each customer role.

    #1113349
    Shawn

    Oh bloody hell I completely forgot about hooks. 🤦‍♂️

    Many thanks

    #1113384
    David
    Staff
    Customer Support

    haha 🙂 You’re welcome

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.