Please explain these three lines for me
-
Hi I’m rading through a series of tutorials on how to use WordPress Custom Fields. It is maybe a little bit over my standard, as my PHP knowledge is pretty limited. This is from the website, but could anyone explain a bit more in depth, whats going on so I can google my way to the rest.
From the website: https://justintadlock.com/archives/2007/10/16/using-wordpress-custom-fields-subtitles
The CODE
//$subtitle = get_post_meta ($post->ID, 'subtitle', $single = true); if($subtitle !== '') echo ': ' . $subtitle;
//
The explanation from the site:
“This code pulls your custom field key of “subtitle” out and displays it on whatever pages have a subtitle.”
please elaborate and in PHP language explain what the different things mean.
Thanks
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Please explain these three lines for me’ is closed to new replies.