[memb_contact]

OTHER DOCS Available

Summary

This shortcode pulls up information from logged in member’s ActiveCampaign contact record such as contact details, custom fields, etc and display it on your WordPress site.

Shortcode Examples

To show first name you’d use:

[memb_contact fields="firstname"]

To show first name and last name with one space between them you’d use:

[memb_contact fields="firstname,lastname" separator=" "]

To show last name, you’d use:

[memb_contact fields="lastname" ]

To show email, you’d use:

[memb_contact fields="email" ]

To show phone number, you’d use:

[memb_contact fields="phone" ]

Creating and showing custom field data using the shortcode

ActiveCampaign offers first name, last name, email and phone as default fields but you can create unlimited custom fields and organize them by groups. For example, let’s say you want to collect information related to birthday. You’d create a custom field for “Birthday” in ActiveCampaign.

You can also check out the official documentation on how to create custom field in ActiveCampaign.

Once the custom field is created and you want to show the data from that field for your user, you’d use the field name of that particular field.

The easiest way to find the field names is to open a user in WordPress and scroll down until you see the Memberium data (screenshot below)

Then you’ll use the names without the % signs. For example, “email” “firstname” and “textareatest” would all be valid field names.

As per the above screenshot, to show data from “Nickname” custom field, you’d use the shortcode like this:

[memb_contact fields="nickname" ]

Here’s one more example showing this shortcode fetch the firstname from contact’s record.
contact shortcode

Examples of Post Processing:


Here are two examples of post processing. The first one will make all letters lowercase and then capitalize the first letter of each word. The second example will make all letters lowercase and only capitalize the first letter of the first word. For more functions you can use, visit this link.

[memb_contact fields=firstname txtfmt=strtolower,ucwords]
[memb_contact fields=firstname,lastname txtfmt=strtolower,ucfirst]

Shortcode Parameters​

capture:  Capture the output of the shortcode and route it to a variable for later use. (?)

contact_id:  The contact ID of a different contact.  Optional.

date_format: The date formatting to use for your field.  You can read more about the date formatting options here.

default: The default value to display if the field is empty or doesn’t exist

htmlattr:  The HTML attribute to use if this shortcode is embedded inside of an HTML tag.

fields: A comma separated list of fields from the Contact table.  You can use the field placeholder here with or without the % symbols.

separator: The string to use to separate the list of fields when output. The default separator is a single space.

txtfmt: A comma separated list of text processing functions to be used to post process the contact fields. (?)

This shortcode is your swiss army knife for displaying any and all information about the contact, and to give you control over the output of that content.

Features include the abilities to:

…capture the field contents to a local variable.

…display a field belonging to another contact.

…display a default value, if the field is empty.

…display multiple fields, and separate them with text of your choice.

…Format the output using Memberium’s text formatting functions.

…Format date fields into the format of your choice.

Shortcode Attributes

Conditional: No (?)
Nestable: No (?)
Accepts formatting: Yes (?)
Capturable: No (?)

9 ways to add more value to your membership site

[memb_contact]

This Applies To