[Resolved] Add link icon next to H2/H3/H4 headers

Home Forums Support [Resolved] Add link icon next to H2/H3/H4 headers

Home Forums Support Add link icon next to H2/H3/H4 headers

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2338773
    Rick

    Hi there,

    I’m wondering if there’s an easy way to add an icon link before each H2, H3 and H4 in my posts.

    When hovering or clicking the link it should show the HTML-anchor so people can copy it. A bit like on these pages:

    https://rankmath.com/kb/rich-snippets/

    Curious to hear πŸ™‚

    Regards,
    Rick

    #2338872
    David
    Staff
    Customer Support
    #2338878
    Rick

    Thanks David, will look at the plugin.

    I was hoping a simple CSS trick belongs to the possibilities. Should I instead just use a plugin to make things easier? πŸ™‚

    Rick

    #2339457
    David
    Staff
    Customer Support

    CSS can only do so many things, we could show the anchor link icon but the copy on click thats not possible. So the Plugin is the best way to go.

    #2341833
    Rick

    I understand, I feel I’m learning more about CSS every day! Thank you David, highly appreciated.

    #2341896
    David
    Staff
    Customer Support

    Simple rule:
    HTML is what outputs the content to the page.
    CSS is what adds style to that content.

    CSS cannot add HTML. So we need some other code, either:

    PHP which is a server side language that could be used to filter the headings HTML and insert the necessary links.
    Javascript which is a language that runs in the users browser and that can crawl that page, create the links and inject them into the HTML.

    I would expect that plugin uses PHP, Javascript and CSS to do it πŸ™‚

    Glad to be of helo.

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