Community Support Forums — WordPress® ( Users Helping Users ) — 2011-08-08T15:53:15-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=14302 2011-08-08T15:53:15-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14302&p=30213#p30213 <![CDATA[Re: S2member user custom field]]>
Code:
echo get_user_field('agency', $author_id); 


I should see the code that comes before what you quoted to have a better idea of how to get the author's ID, but maybe this would work:

Code:
$author_id = get_the_author_meta('ID'); 


So

Code:
<?php echo get_user_field('agency', get_the_author_meta('ID')); ?>


I hope that helps.

Statistics: Posted by Cristián Lávaque — August 8th, 2011, 3:53 pm


]]>
2011-08-08T14:02:51-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14302&p=30191#p30191 <![CDATA[Re: S2member user custom field]]>
Code:
<?php } ?>
   
          <div class="contact">
          
             <span class="button" ><?php echo $woo_options['woo_label_contact_agent_button']; ?></span>
          
             <div class="agent-popup">
                
                <?php the_commenter_avatar(array('avatar_size'=>'56')) ?>
             
 
                               
                <div class="details">
                   <?php $first_name = esc_attr( get_the_author_meta( 'first_name' ) ); ?>
                   <?php $last_name = esc_attr( get_the_author_meta( 'last_name' ) ); ?>
                   <?php if ( ($first_name != '') && ($last_name != '') ) { $display_name = $first_name.' '.$last_name; } else { $display_name = esc_attr( get_the_author_meta( 'display_name' ) ); } ?>
                   <span class="name"><?php echo $display_name; ?></span>
                   <span>
                      <?php echo esc_attr( get_the_author_meta( 'contact_number' ) ); ?>
                   </span>
                                         <span>
                                                <?php echo get_user_field("agency"); ?>
                                         </span>
                   <span>
                      <?php $author_email = esc_attr( get_the_author_meta( 'user_email' ) ); ?>
                      <input type="text" style="display:none;" value="<?php echo $author_email; ?>" id="email" name="email" />
                      <?php if ($woo_options['woo_contact_form_link'] == 'true') { ?>
                      <a href="<?php bloginfo('url'); ?>/<?php echo $woo_options['woo_contact_form_page']; ?>/?propertyid=<?php echo $post->ID; ?>&agentid=<?php echo get_the_author_meta( 'ID' ); ?>" title="<?php echo $author_email; ?>"><?php echo $woo_options['woo_label_agent_email_link']; ?></a><?php } else { ?>
                      <a href="mailto:<?php echo $author_email; ?>" title="<?php echo $author_email; ?>"><?php echo $woo_options['woo_label_agent_email_link']; ?></a><?php } ?>
                      
                   </span>
                   

Statistics: Posted by jeansuhas — August 8th, 2011, 2:02 pm


]]>
2011-08-08T13:25:34-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14302&p=30187#p30187 <![CDATA[Re: S2member user custom field]]> Statistics: Posted by Cristián Lávaque — August 8th, 2011, 1:25 pm


]]>
2011-08-07T12:29:25-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14302&p=30084#p30084 <![CDATA[Re: S2member user custom field]]> why?

Statistics: Posted by jeansuhas — August 7th, 2011, 12:29 pm


]]>
2011-08-05T22:26:56-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14302&p=29967#p29967 <![CDATA[Re: S2member user custom field]]>

viewtopic.php?f=4&t=6546&p=16582#p16582

Statistics: Posted by Cristián Lávaque — August 5th, 2011, 10:26 pm


]]>
2011-08-05T05:34:35-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14302&p=29942#p29942 <![CDATA[Re: S2member user custom field]]> Statistics: Posted by jeansuhas — August 5th, 2011, 5:34 am


]]>
2011-08-04T23:35:21-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14302&p=29908#p29908 <![CDATA[Re: S2member user custom field]]> Statistics: Posted by Cristián Lávaque — August 4th, 2011, 11:35 pm


]]>
2011-08-04T12:55:48-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14302&p=29862#p29862 <![CDATA[Re: S2member user custom field]]> the code works when a connected user want to see the information of another user (custom field). Unfortunately a visitor (unregistered) won't be able to see the information.

I used this peace of code in my theme for the field "adress2":
<span>
<?php echo get_user_field("adress2"); ?>
</span>

To you know any hacks to allow custom fiel diplaying for unregistered users?

Regards

Statistics: Posted by jeansuhas — August 4th, 2011, 12:55 pm


]]>
2011-08-01T22:14:01-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14302&p=29603#p29603 <![CDATA[Re: S2member user custom field]]> viewtopic.php?f=4&t=6546&p=16582#p16582

Read the whole thread to understand it better. :)

Statistics: Posted by Cristián Lávaque — August 1st, 2011, 10:14 pm


]]>
2011-08-01T12:27:01-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14302&p=29574#p29574 <![CDATA[S2member user custom field]]> I have purchased the S2member pro. Sounds awesome.

I have a question:
- user custom field generated by S2member are meta?
- does it means that i can display them somewhere on my theme using this type of code:
<?php echo esc_attr( get_the_author_meta( 'contact_number' ) ); ?>

I have tried. it is not working.

How can i do it?

regards

Statistics: Posted by jeansuhas — August 1st, 2011, 12:27 pm


]]>