• Resolved dangyen

    (@dangyen)


    Hi,
    I have some old posts, they have link buttons,
    Can I add an html icon to the button and it updates on all these posts?

    Currently I have to click on each button and edit their html.

    Before:

    <div class="ex"><a class="">Content</a></div>

    After:

    <div class="ex"><a class=""><span class="dashicons dashicons-admin-media"></span>Content</a></div>

    Thanks you!

    • This topic was modified 2 months, 1 week ago by dangyen.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Whether you can expand HTML code in this form depends primarily on which editor you use to edit the content of the posts and what role your user has. If it is the source code view of the classic editor and you are an administrator, it is possible. It should also work via the HTML block in the block editor.

    Syntactically, it is not a problem. In your example, however, you are trying to integrate a dashicon. If this is to be displayed in the frontend, the dashicons are missing for visitors who are not logged in. You would have to load these separately in the frontend.

    Thread Starter dangyen

    (@dangyen)

    Hi @threadi
    Thanks! this is definitely what I was missing.

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