• Skip to primary navigation
  • Skip to main content
OsomCode

OsomCode

Awesome code tutorials for WordPress and Genesis

  • Subscribe
  • My account
    • Edit profile
    • Favorites
    • Update credit card
  • Login

Adding SVG icons to Osom Modal Login login/logout elements

Discover how to display icons next to the items to access and exit the menu added by the Osom Modal Login plugin.

The Osom Modal Login plugin adds an item to the menu to access or exit conditionally, depending on whether the user is logged in or not.

You can customize the text in the plugin settings. But you may want to add an icon next to the text. For example:

Add item icon to the menu for login Osom Modal login plugin
Add item icon to the menu for logout Osom Modal login plugin

Luckily you can achieve this with a little CSS.

Let’s see how:

Steps to display icons next to Osom Modal Login menu items

1. Choose SVG icons

If you do not have a SVG icons library, there are several free to use, such as:

  • Material
  • Iconsvg
  • Tablericons

Once you have chosen the ones you need, use this online tool to convert the SVG to a format that allows you to use it in CSS, in this case, as background-image.

Tool to convert svg in css

Once you have the two icons, move on to the next step.

2. Give styles using CSS

The Osom Modal Login plugin uses two different classes depending on whether it displays the login or logout element:

  • osmlogin
  • logout

So you can use them to display one icon or another with the ::before pseudo-element.

To do so, insert this code at the end of the style.css file:

To see this and another 1097 code snippets of this website, login or subscribe here.

But this is just an example.

You can use any icon to be displayed next to the menu item.

Conclusions

You can see how easy it is to display some SVG icons next to the login or logout elements of the Osom Modal Login plugin.

Any questions? I read you in the comments.

And if you want to give me any suggestion for future tutorials, leave it in the contact form. Advantages of being a subscriber. 😉

CSS Osom Modal Login WordPress

To leave read and make questions about this code, you can login or register.

  • About OsomCode
  • FAQ
  • Contact

Legal Notice · Privacy Policy · Cookie Policy · Terms and conditions
Copyright © 2026

close-icon

Lost your password?