Nav Menu Roles
This plugin lets you hide custom menu items based on user roles. So if you have a link in the menu that you only want to show to logged in users, certain types of users, or even only to logged out users, this plugin is for you. Nav Menu Roles is very flexible. In addition to standard user roles, you can customize the functionality by adding your own check boxes with custom labels using the nav_menu_roles filter and then using the nav_menu_roles_item_visibility filter to check against whatever criteria you need. You can check against any user meta values (like capabilities) and any custom attributes added by other plugins. IMPORTANT NOTE In WordPress menu items and pages are completely separate entities. Nav Menu Roles does not restrict access to content. Nav Menu Roles is only for showing/hiding nav menu items. If you wish to restrict content then you need to also be using a membership plugin. Usage Go to Appearance > Menus Set the “Target audience” to either “Everyone”, “Logged In Users”, or “Logged Out Users”. “Everyone” is the default. If you wish to customize by role, set the “Target audience” to “Logged In Users” and under “Target role” check the boxes next to the desired roles. The item will be visible to users who have any of the checked roles. Roles are not hierarchical, so an item set to “Subscriber” is not visible to Administrators unless you also check “Administrator”. If no roles are checked, the item is visible to all logged in users. Set the “Display Mode” to “Show” to display the item only to the selected audience, or to “Hide” to hide the item from the selected audience and show it to everyone else. “Show” is the default. Support Support is handled in the WordPress forums. Please note that support is limited and does not cover any custom implementation of the plugin. Before posting, please read the FAQ. Also, please verify the problem with other plugins disabled and while using a default theme. Please report any bugs, errors, warnings, code problems to GitHub
WPML flag in menu Extended
Shows translated flags (for every language except current viewing lang) in any selected menu in the plugin settings LTR support In addition to the plugin from Ramon Fincken, this plugin let you select on which menu you want to add the language flags. You can even make an empty menu and make it dedicated for your language flags and put it as a custom menu in the sidebar. To make the flags appear on a translated menu, you go in the settings of the plugin and add the translated menu to the selection you made. This has to be done with every translated menu where you want the flags to appear. So, if you just have translated a menu. Go back to the options of the widget and you will see that this translated menu is added to the list. Select this menu too and save the options. See other notes tab for explanation Visit: http://www.enovision.net/wpml_flag_in_menu_extended/ for more explanation. additional classes You can also add an additional class for the IMG and LI tag. On the LI tag is automatically added the class “not-last” for all flag items but the last one, and “last” for the last flag. Now you can add some styling like: /* make a border around the flag icon */ img.wpml_flags { border : 1px solid #f1f1f1; } /* bring the icons a bit closer together */ li.wpml_flags.not-last { margin-right : -20px; } /* a little left padding after the flag, when name is used too */ .wpml_flags_name { padding-left : 10px; } You can find these styles in the style.css in the css directory of the plugin. Modify this to your own requirements. How to right justify the menu’s on a menu? You can add a wrapper class around the flags and put some CSS styles on it. In the wrap element you put: div In the wrap extra classes you put: flag_wrapper. #main-nav ul div.flag_wrapper { float: right; } In the wrap element you put: span In the wrap extra classes you put: flag_wrapper. #main-nav ul span.flag_wrapper { float: right; line-height: 14px; /* this could be different */ } How to add a menu to a seperate widget area? Create a new menu f.e. “Language Selecter” Add a custom link to this menu with in the label: [wpml_flag_menu] Save the menu Create/Translate the menu in all your languages (to make it exists in all languages) Modify the wmpl_flag_menu settings and select the menus used created/translated Save the settings Add a custom menu widget to the sidebar or any other widget area and select the “Language Selecter” as selected menu Save the settings and look for the result Limitations This plugin will not create flags on the main navigation menu of SOME(!) Genesis Framework (child) Themes !!! Coding by: Johan van de Merwe