• Hello,
    Is there a way to add the anchor to the url when clicking on the corresponding tab?
    For example if I click on Tab 2, it will add #tab-2 in the url?
    I’m using each tab as post categories so having the anchor in the url is needed to get the post pagination working correctly under each tab.

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • hannah

    (@hannahritner)

    Hi @cgrignon,

    Yes!

    The?Tabs Block?has a?Block Setting?that allows you to set?Anchor IDs?on each?Tab. You can then use the?Anchor ID?at the end of your page?URL?to navigate to the proper?Tab?by?URL. In the?Block Settings?of the?Tabs Block, there is a setting named?Tab Anchor Settings. Under?Tab Anchor Settings, you will see each tab with expandable options
    Here you can set an?Anchor ID?for each?Tab.

    Once you have an?Anchor ID?set, add?#YourAnchorID?to the end of the?URL?of the page with the?Tabs?block on it. This should load the page up in the proper?Tab.

    Hope this is helpful! Let me know if you have other questions.

    Kindly,

    Hannah

    Thread Starter cgrignon

    (@cgrignon)

    Hi Hannah,
    Thank you for your reply, however that is not what I meant.
    I already know about the ability to add an anchor in the block, and it’s great!
    My question was, is there a way (through some extra code I guess?) to automatically add the anchor in the url when you click on a tab as a user?
    So imagine I’m a user going on the page, i click on tab 3, and it dynamically adds the anchor #tab-3 to the url.

    Hope you understand what I mean,
    Cheers,
    Clemence

    hannah

    (@hannahritner)

    Hi Clemence,

    Sorry for misunderstanding. Do you think you could link to an example of this?

    Kindly,

    Hannah

    Thread Starter cgrignon

    (@cgrignon)

    Hello,

    No I don’t really have an example of this, I don’t even know if it’s possible, that’s why i’m asking ^^

    Best,

    Plugin Support Gilbert Hernandez

    (@ghernkadence)

    Hello @cgrignon,

    That isn’t a feature provided by Kadence Blocks. To accomplish your goal, you’d have to write custom JavaScript functions to listen for clicks and redirect you to the updated URL link. Unfortunately, its a bit beyond the scope of support.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Add tab anchor in url on tab click’ is closed to new replies.