Looking For Something?

[wps-usermeta]

Purpose

Displays a profile value (meta) of a user, including standard WordPress meta values such as display_name.

Availability

Provided in the Core Plugin.

Customising

You can use the global shortcode settings via WPS Pro->Shortcodes in the admin dashboard, or add them to the shortcode as options.

Example

[wps-usermeta]

To display the town/city of the user:

[wps-usermeta meta="wpspro_home"]

To display the county of the user:

[wps-usermeta meta="wpspro_country"]

To display a Google map, assuming the user has entered a town/city and country, you could use the following shortcode:

[wps-usermeta meta="wpspro_map" size="400,400" style="dynamic" zoom="6"]

This shortcode also supports the custom profile fields that you add with the Profile Extensions plugin, part of the WP Symposium Pro Extensions plugin.

The use of Profile Extensions is covered elsewhere and can be displayed with [wps-extended], but you could for example, show your saved value of a profile extension with the slug of “my-field” with the following shortcode:

[wps-usermeta meta="my-field"]

Options

The following (which shows default values and an example of using the shortcode option) can be set via the admin dashboard (WPS Pro->Shortcodes) or added as options to the shortcode in your WordPress page, post or widget.

Label   (label=””)
Meta value   (meta=”wpspro_home”)
If Map selected above…
Size   (size=”250,250″)
Map style   (map_style=”dynamic”)
Zoom level   (zoom=”5″)
If User email selected above…
Email as hyperlink   (link=”1″)

Label

This is the label that appears on the screen before the value shown.

Meta value

This is the field (or meta field) that you want to display. Select from the dropdown list on the WPS Pro->Shortcodes->Profile->[wps-usermeta] screen.

If Map is selected above…

Size

The dimensions of the map, width and then height

Map style

Dynamic or Static. Static is an image, whereas dynamic is produced by Google and can be moved around, zoomed in and out, etc.

Zoom level

Initial zoom level of the map.

If user email is selected above…

Email as hyperlink

Set to true if you want the email to show as a mailto: hyperlink that will launch the email client of the user if clicked on.

Sidebar