Hello,
I’ve recently been awarded the responsibility of building a website in wordpress. Since wordpress is fairly simple to use I’ve managed to not screw things up too badly, however I’ve run into a connundrum.
I’ve got a function that will call data from a field and display it -
so it’s [php]<?php if ( $data = get_profile_field_data( 'field=Fieldname ' ) ) : ?>[/php] to check if a field has a value, and [php]<?php member_profile_data( 'field=Fieldname' ); ?>[/php] to display the content of that field.
What I want to do is check if that field has “http://” at the beginning and strip it before it outputs, so that I can hard code the http:// in when I use the output as part of a link. This way users filling in a field called Website, for example, can enter either http://website.com or website.com, and the output will behave the same.
I have read some tutorials, but because I’m working backwards from the problem to the solution and my fundamentals exist only in the minds of those who equate one technical proficiency with being proficient in all things, I’m having some trouble making it work.
I would appreciate a quick insight into how I might go about this, and I promise that as it appears php will be in my future, I will not only learn what the heck I’m doing, I’ll try to help and contribute along the way.
Please, and thank you very much for any help.
Mike