Display or hide unavailable links

When a hyperlink is not available to a user is it best practice to hide it completely or show it in a disabled state.

Example1:

If I user needs to be logged in to post a new item should the "Create item" link be visible to users who are not logged in? My thinking is not to show it at all, however would this no leave users who are no logged in searching for where they click to create a new item?

Example2: If a user needs to be logged in to like an item then it would not make sense to show the number of likes without also showing the thumbs up icon that is also the link to like an item.