Icons on subnavs
-
Hi,
Great extension to Ultimate Member!
I have defined subnavs and I have set icons for these subnavs but the icons does not appears. Is there a way to have the icons available on subnavs?
Thanks!https://wordpress.org/plugins/profile-tabs-for-ultimate-member/
-
Also, I have noticed that ordering of the subnavs is not working.
I have defined the ordering like the normal tab with the number…not working, then I’ve tried with the order on the Attributes but it’s not working also.
Thanks for your help 🙂We are aware of the subnav ordering not working at the moment. This will be fixed in a future update. Thanks for the reminder.
UM does not support icons on the subnavs, and this is not something we can add from the plugin, so you’ll have to reach out to UM about this.
ok, thanks for your reply.
For those who wants icons on subnav items like me, here is a solution.
In the file um-actions-profile.php under the folder ultimate-member/core/
modify line 677 from this:
<a href="<?php echo add_query_arg('subnav', $id ); ?>" class="<?php if ( $active_subnav == $id ) echo 'active'; ?>"><?php echo $subtab; ?></a>
to this:
<a href="<?php echo add_query_arg('subnav', $id ); ?>" class="<?php if ( $active_subnav == $id ) echo 'active '.$subtab; if ( $active_subnav != $id ) echo $subtab; ?>"><?php echo $subtab; ?></a>
Now, all your subnav items have a new class which is the name of the items. So with css you can add icons with :before like this for example:
a.item-name:before, a.active.item-name:before {
content: “\f07a”;
font-family: FontAwesome;
}that’s all 🙂 hope this help.
Thanks for sharing.
- The topic ‘Icons on subnavs’ is closed to new replies.