Display a block when a view doesn't return any result
You can call your block inside "No results behavior", using a "Global: Text area" and the "PHP" Text format.
But you won't be able to display it where you want, it will have to be at the same place as the view.