Support » Plugins and Hacks » Font Awesome 4 Menus » Wrap icon like text

  • Resolved saas

    (@saas)


    Hi,
    Thanks for such a useful plugin.

    I was working on project where I felt I should apply some styles to icon and I felt like wrapping it inside span like you have for text is good way to achieve it, so it will be good if you wrap the icon like

    if ($before) {
                    $newtext = '<span class="fontawesome-icon"><i class="' . implode(' ', $fontawesome_classes) . '"></i></span><span class="fontawesome-text"> ' . $text . '</span>';
                } else {
                    $newtext = '<span class="fontawesome-text">' . $text . ' </span><span class="fontawesome-icon"><i class="' . implode(' ', $fontawesome_classes) . '"></i></span>';
                }

    won’t hurt and will also allow people like me to use it they way we want.

    Thanks,
    Syed

    https://wordpress.org/plugins/font-awesome-4-menus/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author New Nine

    (@new-nine)


    You can apply styles directly to the i class. For example, you could use

    .current-menu-item .fa-home {color: #000;}

    To make the home icon black for the current nav menu item.

    Plugin Author New Nine

    (@new-nine)


    I’m marking this as resolved. Let us know if you have any other problems!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Wrap icon like text’ is closed to new replies.