Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS font icon in wordpress menu?

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #39091
    alicew
    Participant

    Hi there,
    I wonder if anyone has had success with this. I’m drawing a blank and wasting too many hours on trying to make it work.
    I want to add a fontawesome icon to my wordpress menu, to the left of the text. The section is password protected for members only and I want to add a lock icon to indicate this.
    If I just paste

    into the wordpress menu label the code gets sanitized and the brackets converted to html entities.
    I researched that and found that the kses.php file in core controls the sanitization and which tags are stripped from form inputs for security. So I tried adding this to my functions.php

    global $allowedtags;
    $allowedtags = array( 'class="icon-lock"' );

    …but it’s not working so I am doing something wrong.
    Extensive googling draws a blank. Can’t believe I’m the only one out there who wants to add a font icon to a wordpress menu. Perhaps I am overcomplicating it?
    I’d be very grateful for any suggestions.
    Thanks!
    -Alice

Viewing 1 post (of 1 total)
  • The forum ‘CSS’ is closed to new topics and replies.