How do I link to the homepage from a node? I used to had a logo provided by a theme which automatically linked to the home page. But now I replaced this with a custom block. How do I link to the homepage from that custom content type?

Using php in the block code is not an option because of caching.
You can just create a link to the path / (slash with nothing else).
That will take the user to the homepage.