Modified appearance of the Theme My Login WidgetIf you’re using Theme My Login for adding an enhanced member login process on your site, check out the tutorial below to modify the plugin’s included widget feature. This recipe includes code to enhance the widget’s title and customize the displayed list of user links to match your site’s Members menu.

Adding this helpful widget with quick links to important areas of the membership is the perfect way to improve the members experience on your site.


How it Works

This recipe includes three separate functions that each handle a unique piece of the customization process. The first function modify_tml_widget_title modifies the widget’s title. The recipe replaces the default title “Welcome” to include the user’s display name a link to their Membership Account page (if you are using Paid Memberships Pro) or the user profile.

The second function, hide_tml_widget_user_links, is used to remove all of the default links that Theme My Login adds to the widget. You can read more about this filter at the Theme My Login documentation site. Note that if you’d like to keep the default links, just remove that section of the recipe.

show_member_menu_tml_widget_user_panel is the third and final function in the recipe, which is used to insert the “Members” navigation menu into the widget. You can use similar logic to insert another named menu if you would like to add alternative links. We can help you with inserting a custom menu as part of a Memberlite Support membership—just open a topic on our forums.


The Code Recipe


Adding the recipe to your website

Copy and paste this code recipe into a helper Memberlite Customizations plugin.


Screenshots

Before
Default appearance of the Theme My Login Widget
After
Modified appearance of the Theme My Login Widget

Leave a Reply