get url fix

fixed preview url, if empty uses wp root url instead of php error