i add sime custom fields to an wordpress website and one of them is adsense (users will put their pub-xxxxxxxxxx) -> i want for the users who set this field from profile to show an adsense ad with their id but for thoose who dont to show my "pub-id" as much as i know i must use if function .... but i dont know how to use it ... i use this code to show the profile field: <table class="form-table"> <tr> <th><label for="adsense">Adsense</label></th> <td> <input type="text" name="adsense" id="adsense" value="<?php echo esc_attr( get_the_author_meta( 'adsense', $user->ID ) ); ?>" class="regular-text" /><br /> <span class="description">Please enter your adsense "pub-id".</span> </td> </tr> </table> PHP: how can i do this? :| (by the way ... i`m trying to make an open blog - register and start posting ... many cool options for the users ... read postin guide first --- link in my signature)
can`t make it work .... this is the extra profile field : <table class="form-table"> <tr> <th><label for="twitter">Twitter</label></th> <td> <input type="text" name="twitter" id="twitter" value="<?php echo esc_attr( get_the_author_meta( 'twitter', $user->ID ) ); ?>" class="regular-text" /><br /> <span class="description">Please enter your Twitter username.</span> </td> </tr> </table> PHP: and this is what i use to display <a href="http://twitter.com/<?php the_author_meta('twitter'); ?>"><img border="0" src="/wp-content/themes/mytheme/custom/img/twitter.png" alt="HTML tutorial" width="24" height="24" /></a> PHP: where should i put that code?