Anchors for code blocks?

Hi folks!

I was wondering if it's possible to set an anchor within the theme for code blocks. Even if I put an anchor tag in the code block, Upfront doesn't seem to recognize it as a linkable anchor when defining a link in (for example) the header nav. The normal way of doing it isn't available, as the little green config icon doesn't appear for code blocks. Any solution?

  • Kasia Swiderska
    • Support nomad

    Hello Noah,

    If you use code block I assume that you put there your custom code, yes? If yes, you can insert an HTML blank tag with custom ID that you will use later in menu.
    For example<span id="customID"></span>
    and then in link in menu, you can use #customID.
    If this is not a case, or this is not working can you grant support access for me, to get closer look at this issue?
    You can grant support access via WPMU DEV > Support > Support Access > Grant Access.

    kind regards,

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.