Use this CSS to hide Courses link from site homepage. Add this CSS code in Edwiser RemUI general setting > Custom CSS section

#page-course-index #coursestab,
#page-course-index #coursesregion {
display: none;

Once this is done, navigate to Site administration > Appearance > Additional HTML > Before BODY is closed
Here you need to add this code:

<script type="text/javascript">
window.addEventListener('load', function () {
if (document.querySelector('body').id == 'page-course-index') {