This works perfectly and both 'y' and 'z' give the same output on the serial monitor.
If I change WiFiManagerParameter custom_text**(z)**; to WiFiManagerParameter custom_text (y); I recieve an error.
What am I doing wrong or how can I change (y) to work within the WifiManager?
Since you didn't post the error message, I'll guess that the custom_text function wasn't written to take a String parameter. The best solution is to simply not use String. You'll find this sort of problem happens quite often when using String, but much less often when using strings.
If you insist on using String, you will need to convert it to string before you pass it to the custom_text function. You can do that using the c_str() function: