You can not use conditional tags on init Queries are only available after “wp” action hook, so ‘init’ is too early to check for it.