creating conditionals to check for wp existence before initaiting