• Resolved Robodashy

    (@robodashy)


    Hi there.

    First of all – great plugin, thanks heaps!

    The setup:
    The home page has a short list of services provided.
    The services page has a full list of services provided – as an accordion with a description of the service in the spoiler content section.

    The question:
    What I am trying to do is have an anchor link within the services accordion – so that people can click on a service on the home page, and they will be taken to the particual service on the services page with the accordion expanded.

    What I’ve tried:
    I’ve gone to the [su_spoiler] and have tried adding a <a name="name-of-service"> both inside and outside of (not at the same time – it’s just that neither method works) the [su_spoiler] so that I can then click on the service on the home page and be taken to the specified service on the services page.

    In doing this (either inside or outside) – the html is displayed in the accordion and the method doesn’t work.

    Is what I am trying to do possible, and if so – how? If not, can you recommend another method that will work?

    Thanks

    https://www.ads-software.com/plugins/shortcodes-ultimate/

Viewing 5 replies - 1 through 5 (of 5 total)
  • You need to do this in Text Mode. In your spoiler content, wrap the thing you want people to click on in anchor tags.
    My html isn’t coming through properly, see here for link syntax: https://www.w3schools.com/html/html_links.asp

    Thread Starter Robodashy

    (@robodashy)

    Hi Trixee.

    Wow, total derp move on my part. Thought I was in text mode but was in visual.

    Anyone know how to use this anchor tag so that when you click the link on the homepage the accordion section expands? I’m thinking a bit of JS required?

    Sorry not at my desk so I’m trying to remember here. You don’t need JS, this is simple HTML.

    You use the anchor tags inside the spoiler where you have the content. So for example (I figured out how to do this now!) if you wanted some text that says “click here” and you want “click here” to link to your services page:

    <a href="https://your_website.com/services">Click here</a>

    You need to put your permalink in instead of the dummy address I put in the example.

    I hope that makes sense? Unless I’m misunderstanding your requirements.

    perhaps an anchor?

    check this post, see if helps..

    Thread Starter Robodashy

    (@robodashy)

    Thanks Edumusa. That was exactly what I was looking for.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Anchor link in accordions’ is closed to new replies.