#1 WordPress forum plugin created by gVectors Team

wpForo – WordPress Forum Plugin
  • Home
  • Forum
  • Migrate to wpForo
  • Addons
  • Addons Demo
  • Documentation

Forum

Home | Forum

wpDiscuz - WordPress Comment Plugin
  • Forums
  • Members
  • Recent Posts
Forums
Main Support Forums
How-to and Troubles...
Can I show the name...
 
Share:
Share
Tweet
Share
Notifications
Clear all

[Solved] Can I show the name and avatar somewhere else?

    Last Post
RSS

DMolina
Posts: 34
 DMolina
Topic starter
January 31, 2020 8:55 pm
(@dmolina)
Eminent Member
Joined: 3 years ago

I would like to show the username with your avatar in a menu, to display the account options, is there already any function to do this?

DMolina |m/

Topic Tags
avatar
6 Replies
Robert
Posts: 8968
Robert - Twitter
 Robert
Admin
February 1, 2020 5:40 am
(@robert)
Support Team
Joined: 6 years ago

The avatar could be displayed using this function:

<?php echo get_avatar( get_current_user_id(), 60 ); ?>

The user display name:

<?php echo WPF()->current_user_display_name; ?>

In case you want to say thank you !)
We'd really appreciate and be thankful if you leave a good review on plugin page. This is the best way to say thank you to this project and support team.

5 Replies
DMolina
 DMolina
(@dmolina)
Joined: 3 years ago

Eminent Member
Posts: 34
February 1, 2020 5:47 am
Reply toRobertRobert

@robert

Isn't there a way to use both in one function?
I want to do this, but with the functions of Wordpress I can not show the avatar of the forum profile

 

 Screenshot_2020-01-31-Inicio1.png

DMolina |m/

Robert
 Robert
Admin
(@robert)
Joined: 6 years ago

Support Team
Posts: 8968
Robert - Twitter
February 1, 2020 6:09 am
Reply toDMolinaDMolina
Robert

@dmolina

Why a function? Just put those together:

<?php echo get_avatar( get_current_user_id(), 60 ) . ' <span class="user-name">' . WPF()->current_user_display_name . '</span>' ?>

 

In case you want to say thank you !)
We'd really appreciate and be thankful if you leave a good review on plugin page. This is the best way to say thank you to this project and support team.

DMolina
 DMolina
(@dmolina)
Joined: 3 years ago

Eminent Member
Posts: 34
February 1, 2020 6:13 am
Reply toRobertRobert
DMolina
Robert

@robert

Sorry, I have not programmed for a while but I understand how to use it!
Thank you!

 

DMolina |m/

DMolina
 DMolina
(@dmolina)
Joined: 3 years ago

Eminent Member
Posts: 34
February 4, 2020 5:14 pm
Reply toRobertRobert
DMolina
Robert

@robert

I think I need a little more help, this function still brings me the Wp avatar, but the one I need to show is the wpforo

<?php echo get_avatar( get_current_user_id(), 60 ); ?>

 

DMolina |m/

DMolina
 DMolina
(@dmolina)
Joined: 3 years ago

Eminent Member
Posts: 34
February 4, 2020 8:12 pm
Reply toDMolinaDMolina
Robert
DMolina
Robert

Ready, I could make it thanks!

DMolina |m/

  All forum topics
  Previous Topic
Next Topic  
Related Topics
  • Show Likers with their avatar
    2 days ago
  • Ongoing issue with Avatar Images
    2 months ago
  • Avatars Not Uploading
    2 months ago
  • How to fix user details spacing in post (MOBILE only)
    4 months ago
  • Avatars copyright
    4 months ago
Topic Tags:  avatar (40),

Forum Search

Join Us!

Download wpForo plugin
on WordPress.org

wpForo Addons

wpforo-private-messages wpforo-advanced-attachments-128x128 wpforo-embeds-128x128 wpForo User Custom Fields addon wpForo – Blog Cross Posting addon wpForo Ads Manager wpForo – WooCommerce Memberships Integration wpForo Emoticons wpForo – Tenor GIFs Integration
View all Addons »

Recent Topics

  • Menu location

    By Vijiki, 2 hours ago

  • Setting recent topics on forum frontend

    By Vijiki, 10 hours ago

  • Draft draft users post on wpforo

    By Vijiki, 12 hours ago

  • How to remove content from email notification

    By Vijiki, 13 hours ago

  • How to prevent forum users from PASTING / posting multiple colors and font sizes...??

    By Noved, 2 days ago

  • purchase of add on and it says payment pending

    By ReddBeard, 3 days ago

Topic Tags

  • translation49
  • css49
  • plugin conflict48
  • seo45
  • new features44
  • buddypress42
  • ultimate member40
  • avatar40
  • forum40
  • moderation38
  • login38
  • registration36
  • threaded layout35
  • cache33
  • editor32
  • menu32
  • shortcode31
  • spam29
  • phrases28
  • forum accesses28
View all tags (2163)

Recent Posts

  • Menu location

    I will like to change the menu drop-down position/behav...

    By Vijiki, 2 hours ago

  • RE: Setting recent topics on forum frontend

    ok, now you explained better what you want to do. It ca...

    By dimalifragis, 5 hours ago

  • Problem with private forum

    Hi, i've one problem with my private forum. I want the ...

    By Darkkang, 11 hours ago

  • Draft draft users post on wpforo

    Hello How can I draft users post on wpforo (like a te...

    By Vijiki, 12 hours ago

  • RE: How to remove content from email notification

    Edit the body of the emails, in wpForo settings / email...

    By dimalifragis, 12 hours ago

  • RE: Show Likers with their avatar

    Have now found the correct code 😀 are these 3 lines ...

    By Tutrix, 2 days ago

  • RE: How to prevent forum users from PASTING / posting multiple colors and font sizes...??

    @noved add this to custom css #wpforo #wpforo-wrap ...

    By Tutrix, 2 days ago

Share:
Share
Tweet
Share
  Forum Statistics
20 Forums
9,763 Topics
49.5 K Posts
7 Online
43.8 K Members

Latest Post: Menu location Our newest member: "ОСНОВАНИЕ ОСМАН 95 СЕРИЯ (KUR... Recent Posts Unread Posts Tags

Forum Icons: Forum contains no unread posts Forum contains unread posts

Topic Icons: Not Replied Replied Active Hot Sticky Unapproved Solved Private Closed

Powered by wpForo | Copyright © 2016-2022 gVectors Team
Copyright Registration Service - Click here for more information or to register work
wpForo is Registered with the IP Rights Office
Copyright Registration Service

Ref: 4477265538
  • Home
  • Forum
  • Migrate to wpForo
  • Addons
  • Addons Demo
  • Documentation