*Is there a way to display links by specific role or capabilities?*
I have made user levels with User Role Editor
I gave user role 'Year1' privileges to read and level_0 and 'Year2' privileges to read and level_1
I'm using User Login Widget and I have edited the log out section to show links.
I want to show different links to users at that specific role.
This is the code where the links appear
}else{
global $userdata;
if(isset($before_title)) echo $before_title;
echo "Welcome : ". $userdata->display_name;
if(isset($after_title)) echo $after_title;
?>
<form name="logoutform" id="logoutform" action="<?php echo site_url('wp-login.php?action=logout&redirect_to='.site_url('/index.php'), 'logout_post') ?>" method="post">
<ul><li><a href="http://www.floridaicam.org/student-access">myFICAM</a></li>
<li><a href="http://www.floridaicam.com/calendar">Academic Calender</a></li>
<br><br>
<li><a href="<?php echo wp_logout_url(site_url('index.php'));?>">LogOut</a></li></ul>
</form>
and this is the code I tried inserting where the break tags are but it shot out an error.
<?php
if ( current_user_can( 'level_0' ) ) { ?>
link
<?php } ?>
*Is there a way to display links by specific role or capabilities?*