Home Forums Plugin Support WP User Frontend Pro Show info author in single.php

This topic is: resolved

This topic contains 5 replies, has 2 voices, and was last updated by  creatius 6 years ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #4147

    creatius
    Participant
    Post count: 11

    Hello,

    I want to show user registration information in the file single.php. I tried with the following code but it shows nothing.

    example:

    in single.php

    <?php echo the_author_meta('metaname'); ?>

    Thanks

    #4153

    Tareq Hasan
    Keymaster
    Post count: 2831

    You've already opened a similar topic, so why create another topic? and what I asked you didn't give me clear information.

    As you want to show it on single.php, the author id can be get by $post->post_author. So echo get_user_meta( 'meta_key', $post->post_author, true ); should do the job.

    #4155

    creatius
    Participant
    Post count: 11

    Sorry, I did not want to confuse the request. I just tested the code but does not work.

    #4156

    creatius
    Participant
    Post count: 11

    Solved, I just did it with the following code:

    $user_info = get_userdata($post->post_author);
    
    $phone = $user_info->phone;
     echo ☎

    Thanks, I just need to fix the map in the author.php

    #4157

    Tareq Hasan
    Keymaster
    Post count: 2831

    Are you using any custom or premium theme? Please check it in twentytwelve theme with other plugins deactivated. Seems like someone messing with the global varibales.

    #4158

    creatius
    Participant
    Post count: 11

    Now I'm testing with twentytwelve.

Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘Show info author in single.php’ is closed to new replies.