[Resolved] Trying to conditionally change text of off-canvas-toggle-label

Home Forums Support [Resolved] Trying to conditionally change text of off-canvas-toggle-label

Home Forums Support Trying to conditionally change text of off-canvas-toggle-label

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1608570
    Randy

    I’d like to know which php function to use to change the text in the off-canvas-toggle-label conditionally (I am using a php $_GET(myparam) to know when I want to toggle the menu to an alternate text).

    Basically, the off-canvas-toggle-label will say “Sign In” when you’re not signed in and I want it to say “Sign Out” when you are already signed in (I’m not using wordpress for sign in…I’m using Sign In with Google, so I can’t use a trigger based on wordpress sign in state).

    So basically, what php filter can I use to grab the text in the off-canvas-toggle-label and change it?

    Thank you πŸ™‚

    #1608648
    Leo
    Staff
    Customer Support

    Hi there,

    Are you referring to the desktop toggle label option?

    If so something like this should help:
    https://generatepress.com/forums/topic/off-canvas-menu-need-in-spanish-for-spanish-site/#post-1387150

    #1608695
    Randy

    Beautiful! That worked πŸ™‚

    #1608697
    Leo
    Staff
    Customer Support

    No problem πŸ™‚

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