Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
|
New Webmasters ask "How-To" questions here. This is where other fucking Webmasters help. |
|
Thread Tools |
03-12-2012, 12:46 AM | #1 |
Confirmed User
Industry Role:
Join Date: Nov 2005
Location: Scottsdale
Posts: 2,283
|
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> |
03-12-2012, 02:38 AM | #2 |
Registered User
Industry Role:
Join Date: Feb 2012
Posts: 24
|
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:
|
03-12-2012, 12:39 PM | #3 |
Confirmed User
Industry Role:
Join Date: Nov 2005
Location: Scottsdale
Posts: 2,283
|
awesome, thanks for your help. i'll give this a try.
|