-
Hi,
I want to know how I can integrate USerPro badges in Author Field (in a post)? I mean, override wordpress author field with UserPro user badge.
Best Regards.
You need to append the php with this function:
echo userpro_show_badges($user_id, $inline=true);
Thanks!
I paste:
$user_id=<?php the_author_nickname(); ?>
<?php echo userpro_show_badges($user_id, $inline=false); ?>Please Help me, i’m PHP beginner 🙁
$user_id=
This is not a valid code. Are you trying to get the author ID? you should use
PHP1<?php $user_id = get_the_author_meta('ID'); ?>🙂
Check an example post (in author field, before content) http://igmr.co/RgrEk
PHP12345678<?php$user_id = get_the_author_meta('ID');echo userpro_show_badges($user_id, $inline=true);?>Nothing, only appears php code but no profile badge 🙁
Are you adding that code as php in your template? You should edit the template file (php file) and insert it as php code – not a shortcode
You must be logged in to reply to this topic.