I'm not a programmer but I have basic understanding when it comes to modifying existing code.
I'm dealing with a User Generated Content website where end-users can fill out a form to post their content.
One of the custom fields within that form is meant to promote their website link.
Custom field: cf_website which I can output within the templates anywhere.
The theme that I am using automatically transforms the user's input text into a clickable link, what I am trying to do is to strip the https://www or whatever is prepended to the domain name in order to output only the domain.com as a link.
Ex:
User input = https://www.example.com or http://www.example.com or https://example.com or www.example.com
Output --> example.com
I know I will need to declare this function within the theme's Functions.php file (WordPress theme)
I've done some research online and found few links that seem to hint in the right direction although I can't find something that tackles the value of a specific custom field merge tag.
I have tried:
Any feedback/suggestions/hint would be appreciated.