I am new to wordpress, so I have the following question, regarding if this is the right way to do this. It seems to work in my context, but I am curious, if there are better ways to do this?
I am using wordpress as a cms and have a section of portfolio pages. Some of them have urls to projects and some don't have that. So I have the following to check if that custom field is there:
if ( get_post_meta($post->ID, 'project_url', true) != "" ) {
// Add link here
};
Is this how I would do this?
Thanks a lot for any advice on this!