fixing issues with title_image template, we need to use isset() correctly to prevent all errors & need to use wordpress functions