Eiti prie turinio
WordPress.org

Lithuania

  • Temos
  • Įskiepiai
  • Naujienos
  • Apie
  • Susisiekti
  • Modeliai
  • Prisidėkite
  • Parsisiųsti WordPress
Parsisiųsti WordPress
WordPress.org

Plugin Directory

DP Username & Role Display

  • Įkelkite įskiepį
  • Mano mėgstami
  • Prisijungti
  • Įkelkite įskiepį
  • Mano mėgstami
  • Prisijungti

DP Username & Role Display

Autorius Dixit Pujara
Parsisiųsti
  • Informacija
  • Atsiliepimai
  • Diegimas
  • Kūrimas
Pagalba

Aprašymas

DP Username & Role Display shows the display name and role(s) of the currently logged-in user near the top of every page on the front end of your site.

It is useful for membership sites, intranets, staging environments, and any site where it helps to know, at a glance, who is logged in and what role they hold.

Features

  • Shows the logged-in user’s display name and role(s) on the front end.
  • Enable or disable the display from a settings page.
  • Choose the background, text, and label colors with the built-in WordPress color picker.
  • Edit the label text („User:” and „Role:”) to whatever wording you prefer.
  • Pick from 5 ready-made display templates that change the front-end layout (classic bar, full-width banner, rounded pill, minimal inline, and accent card).
  • Optionally show the user’s profile icon (avatar) next to their name, with an adjustable size.
  • Place the block anywhere with the [dp_user_role_display] shortcode – every setting can be overridden per shortcode.
  • Built-in shortcode generator on the settings page: it updates live as you change options, ready to copy and paste.
  • Lightweight, translation-ready, and uses only standard WordPress APIs.
  • Ships with translations for Spanish, French, German, Hindi, and Gujarati.
  • Nothing is shown to logged-out visitors.

Ekrano nuotraukos

Admin settings page: enable toggle, background/text/label color pickers, editable labels, and the display template selector.
Admin settings page: enable toggle, background/text/label color pickers, editable labels, and the display template selector.
Template 1 - Classic Bar (right aligned).
Template 1 – Classic Bar (right aligned).
Template 2 - Full-width Banner (centered).
Template 2 – Full-width Banner (centered).
Template 3 - Rounded Pill (centered).
Template 3 – Rounded Pill (centered).
Template 4 - Minimal Inline.
Template 4 – Minimal Inline.
Template 5 - Card with accent.
Template 5 – Card with accent.

Diegimas

  1. Upload the dp-username-role-display folder to the /wp-content/plugins/ directory, or install the plugin through the Plugins > Add New screen in WordPress.
  2. Activate the plugin through the Plugins screen in WordPress.
  3. Go to Settings > User Info Settings to enable the display and choose your colors.

DUK

Who can see the user info?

Only logged-in users see their own username and role. Logged-out visitors see nothing.

Can I change where it appears?

The info is output using the wp_body_open hook, so it appears at the top of the page body. Most modern themes support this hook.

Can I change the colors?

Yes. Go to Settings > User Info Settings and use the color pickers for the background, text, and label colors.

Can I change the „User” and „Role” wording?

Yes. The User Label and Role Label fields on the settings page let you set any text you like (for example „Logged in as” or „Account”).

What are the templates?

The plugin includes 5 display templates that change how the info looks on the front end: a classic right-aligned bar, a full-width banner, a centered rounded pill, a minimal inline style, and an accent card. Pick one from the Display Template dropdown on the settings page.

How do I show the profile icon?

Enable Show Profile Icon on the settings page and set the size (16-128 pixels). The plugin uses the standard WordPress avatar (get_avatar()), so it shows the same profile picture as elsewhere on your site.

How do I use the shortcode?

Add [dp_user_role_display] to any post, page, or widget. With no attributes it follows your saved settings. You can override any of them per shortcode:

[dp_user_role_display template="3" avatar="yes" avatar_size="48" bg_color="#0d1b2a" text_color="#ffffff" label_color="#ffd60a" user_label="Logged in as" role_label="Access level"]

Available attributes: template (1-5), bg_color, text_color, label_color (hex colors), user_label, role_label (text), avatar (yes/no), avatar_size (16-128). The settings page also generates the shortcode for you as you change options.

Does the shortcode work when Enable Display is off?

Yes. The Enable Display toggle only controls the automatic block at the top of the page. The shortcode always renders for logged-in users, so you can turn off the automatic display and place the info exactly where you want it.

Is the plugin translated?

Yes. Spanish, French, German, Hindi, and Gujarati translations are bundled, and the plugin picks the right one automatically based on your site language. Every string is translation-ready, so any other language can be added via the included .pot template or translate.wordpress.org.

Atsiliepimai

Įskiepis neturi atsiliepimų.

Programuotojai ir komandos nariai

“DP Username & Role Display” yra atviro kodo programa. Prie jos sukūrimo prisidėję žmonės surašyti toliau.

Autoriai
  • Dixit Pujara

Išverskite “DP Username & Role Display” į savo kalbą.

Domina programavimas?

Peržiūrėkite kodą, naršykite SVN repozitorijoje, arba užsiprenumeruokite kodo pakeitimų žurnalą per RSS.

Pakeitimų istorija

1.1

  • Added an optional profile icon (avatar) next to the username, with an enable/disable setting and adjustable size (16-128 px).
  • Added the [dp_user_role_display] shortcode with per-shortcode overrides for template, colors, labels, and avatar.
  • Added a live shortcode generator on the settings page with a copy button.
  • Added bundled translations: Spanish, French, German, Hindi, and Gujarati.
  • Styles are now loaded automatically on pages that only use the shortcode.

1.0

  • First release in the WordPress.org plugin directory.
  • Displays the logged-in user’s name and role on the front end using the wp_body_open hook.
  • Settings page with enable/disable toggle.
  • Background, text, and label color pickers.
  • Editable „User” and „Role” label text.
  • 5 selectable front-end display templates.

Metainformacija

  • Version 1.1
  • Atnaujinta prieš 2 savaitės
  • Aktyvių instaliacijų Mažiau nei 10
  • WordPress versija 5.2 ar naujesnė
  • Ištestuota iki 7.1.1
  • PHP versija 7.2 ar naujesnė
  • Kalba
    English (US)
  • Žymos
    loginmembersprofileuser roleusername
  • Daugiau

Įvertinimai

No reviews have been submitted yet.

Your review

See all reviews

Autoriai

  • Dixit Pujara

Pagalba

Turite pastabų? Reikia pagalbos?

Peržiūrėti pagalbos forumą

  • Apie
  • Naujienos
  • Hostingo tiekėjai
  • Privatumas
  • Tinklalapių pavyzdžiai
  • Temos
  • Įskiepiai
  • Modeliai
  • Mokykitės
  • Pagalba
  • Kūrėjai
  • WordPress.tv ↗
  • Prisidėkite
  • Events
  • Paremkite ↗
  • Swag ↗
  • WordPress.com ↗
  • Matt ↗
  • bbPress ↗
  • BuddyPress ↗
WordPress.org
WordPress.org

Lithuania

  • Visit our X (formerly Twitter) account
  • Apsilankykite mūsų Bluesky paskyroje
  • Visit our Mastodon account
  • Apsilankykite mūsų Threads paskyroje
  • Visit our Facebook page
  • Visit our Instagram account
  • Visit our LinkedIn account
  • Apsilankykite mūsų TikTok paskyroje
  • Visit our YouTube channel
  • Apsilankykite mūsų Tumblr paskyroje
Kodas – tai poezija.
The WordPress® trademark is the intellectual property of the WordPress Foundation.