Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End [Solved] Custom Fields get_post_meta question Re: [Solved] Custom Fields get_post_meta question

#64719
minuscircus
Member

Actually Doc,

I’ve coem back with my tail between my legs! I’m trying to do what you suggested ie with the "if" statement as some of the artists only have myspace accounts (and not band websites) – this is what i have and what is working for me at the moment (without the IF statement)

Code:
ID, ‘artist-image’, true);
$websiteCode = get_post_meta ($post ->ID, ‘website-address’, true);
$myspaceCode = get_post_meta ($post ->ID, ‘myspace’, true);
?>

more info

” target=”_blank”>Visit Website
” target=”_blank”>Visit Myspace

My attempt at implementing your code:

Code:
ID, ‘artist-image’, true);
$websiteCode = get_post_meta ($post ->ID, ‘website-address’, true);
$myspaceCode = get_post_meta ($post ->ID, ‘myspace’, true);
?>

more info

Website:

‘;
}
if ($myspaceCode) {
echo ‘

Myspace:

‘;
}
?>

Any ideas? Thanks :-/