|
|
|
||||
|
|
#1 |
|
Registered User
Industry Role:
Join Date: Nov 2005
Location: Arizona
Posts: 1,881
|
Code Help
hey guys, i need some help with some code. what code would i use if i only wanted to show "Cumshots" when there is a value entered? i tired:
<?php if((get_post_meta($post->ID, "shots", true)) ) { ?> but it didn't work. <td><span>Name:</span> <? echo $name ?></td> <td><span>Video:</span> <? echo $video ?></td> <td><span>Pictures:</span> <? echo $pics ?></td> <td><span>Cumshots:</span> <? echo $shots ?></td>
__________________
Chica's Place | Gloryhole Swallow | Blog | Webmaster$ DaveG ICQ: 338-410-735 dave@chica4cash.com |
|
|
|
|
|
#2 |
|
Registered User
Industry Role:
Join Date: Feb 2012
Posts: 20
|
I assume you're talking about WordPress.
I don't know what are the $name, $video and $pics variables in your code, but if you have a custom field named 'shots' and you want to display it's value if it exists, then this works: PHP Code:
|
|
|
|
|
|
#3 |
|
Registered User
Industry Role:
Join Date: Nov 2005
Location: Arizona
Posts: 1,881
|
awesome, thanks for your help. i'll give this a try.
__________________
Chica's Place | Gloryhole Swallow | Blog | Webmaster$ DaveG ICQ: 338-410-735 dave@chica4cash.com |
|
|
|