Sign in

How to use anchor links from theme settings?

  • This topic has 5 replies, 2 voices, and was last updated 7 months, 3 weeks ago by .
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #9203
    Avatar photoGyges

    That is, I would like to mark text in a post as anchor and link to this position it from text in the theme settings.

    Avatar photocandidexmedia

    Hi! What do you mean by linking to the anchor in the theme settings?

    Typically, to create an anchor, you would add an ID to the markup of the text. Here’s an example for the webpage

    <p>This is my text. Here's my <span id="the-id">anchor</span>. Hope you like it!</p>

    Then, to create an anchor link, you would add a reference to that webpage, follow by a slash, # and the ID:

    <p>Here is my anchor. Hope it works!</p>


    Avatar photoGyges

    I mean a link from the frontpage’s hero section to a certain position on a certain page, namely a certain meal with a h4 heading.

    With your method, this is what I get:

    • 16 – YAKI-TORI
      4,50 €
      2 STK – Japanische Hühnchenspieße mit Teriyaki Sauce
    • anchor class=”uKXCDd”>17 – Satay Gay
      4,50 €
      2 STK – Thailändische Hühnchenspieße mit Erdnuss Sauce
    Avatar photocandidexmedia

    You need to use an ID inside your H4, not a class. Anchors only work with IDs.

    Avatar photoGyges

    The anchor class has the same identifier than the headings’ and got created automatically upon saving, maybe due to the span tag.

    I tried without span tag and now it works:

    <h4 id=”satay-gay” class=”uKXCDd”>17 – Satay Gay</h4>

    Thanks for your help!

    Avatar photocandidexmedia

    Yes, I should have specified: the ID should be added to whatever HTML tag you want to reference to. Could be a p tag, a heading, a div, etc.

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