-
Hi there,
Please advise, what shortcode to use, to enable phone number field appearing inside author card template on front end?
I have tried variations of shortcode, to no avail. For example: [userpro template=card user=author option=phone-number]Ideally I want to replace bio on author profile card and instead add phone number value in its place. Please tell me what php code to add to card template, to display telephone number instead of bio?
Why do you use Option? option is option, not field.
By oooking at template i dont think that there is any chance to add your fields without modify template file.
So open card.php file in templates folder and add code after the first acurance of<div class="userpro-clear"></div>
add this code:
<?php echo userpro_profile_data('phone-number', $user_id); ?>
to template in place where you want it to appear, also add some styling.
This “trick” is documented in forum, so read it and you can display any field by using this method.Thank you so much, the phone number is now displaying correctly on the card.
userpro_profile_data can display any custom field you want. Say if your phone number field is called phone_number simply use Tomas code 🙂 and put it where you want it to appear.
the author card is templates/card.php
Remember that if you want phone number to be added as a SOCIAL ICON, you need to add/drag the phone number field to SOCIAL fields in your fields setup as well. 🙂
Thanks!
Thank you Ahmed, I have added the code to the card.php already and its working fine now.
Thanks for the tip regarding the social icons as well.
Now I if can just get a pop contact form to work on email icon, then all my userpro issues will be solved.
You must be logged in to reply to this topic.