HEllo,
i have rewritten the codes. please remove above one and try this one:
add_action('wp_footer',function(){
if(!current_user_can('manage_options') ):
?>
<script>
jQuery(document).ready(function($){
$("body").delegate(".course .item-title>a","click",function(event){
event.preventDefault();
});
});
</script>
<script>
jQuery(document).ready(function($){
$("body").delegate(".course ul#course-list .item-avatar>a","click",function(event){
event.preventDefault();
});
});
</script>
<?php
endif;
});
Thanks for confirming. closing this topic.