[memb_contact]

Summary

This shortcode pulls up any piece of information (contact details, custom fields, etc.) from the member’s ActiveCampaign contact record.

Shortcode Examples

To show first name you would use:

[memb_contact fields="firstname"]

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

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

Examples of Post Processing:

[memb_contact fields="firstname" txtfmt="strtolower,ucwords"]
[memb_contact fields="firstname,lastname" txtfmt="strtolower,ucfirst"]
[memb_contact fields="firstname,lastname" txtfmt="strtolower,ucwords"]
[memb_contact fields="firstname" txtfmt="strtoupper,str_rot13"]
[memb_contact fields="FirstName,LastName" separator=" " txtfmt="ucfirst"]
[memb_contact fields="FirstName,LastName" separator=" " txtfmt="sanitize_title"]
[memb_contact fields="FirstName,LastName" separator=" " txtfmt="sanitize_title,strtoupper"]
[memb_contact fields="FirstName,LastName" separator=" " txtfmt="sanitize_title,md5"]

 

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. (?)

 

Description

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 (?)