Support » Plugin: Scroll to Anchor » Shortcode

  • Hello

    I’m using some drag and drop site builder and I can not see anchor icon.
    Is there some other option? Shortcode?

    Reagards

Viewing 1 replies (of 1 total)
  • Plugin Author Bego Mario Garde

    (@pixolin)

    Some site builder plugins indeed change the default behavior of the visual editor, making the button to insert the anchor shortcode inaccessible. In that case you still can insert the shortcode manually to get the smooth scrolling animation, if a link to a text anchor is clicked.

    This shortcode …
    [sta_anchor id="foo"]

    … will be replaced in the front end by
    <span id="foo" class="sta-anchor ">Anchor: foo</span>

    If you chose in settings > reading, not to display the anchor in the frontend, the shortcode will be replaced with this instead:
    <span id="anker" class="sta-anchor " aria-hidden="true"></span>

    Sometimes users want to give the anchor some extra styling in their style sheet. You can add a CSS class to a particular anchor with this shortcode:

    [sta_anchor id="foo" class="bar"]

    As a result, this shortcode will be rendered as
    <span id="foo" class="sta-anchor bar">Anchor: foo</span>

    The link to the text anchor should look like
    <a href="#foo">Go to anchor foo</a>

    If that was the information you were looking for, please mark this thread as resolved. If not, feel free to ask. 🙂

Viewing 1 replies (of 1 total)
  • The topic ‘Shortcode’ is closed to new replies.