Description
This shortcode allows you to show the avatars of buyers of the content.
Shortcode Attributes
Attribute | Type | Required | Default | Description |
---|---|---|---|---|
post_id |
int | No | - | Option to provide a post ID. If not used, the current posts ID is used instead. |
number |
int | No | 10 | The number of avatars to show. |
size |
int | No | 42 | The avatar size in pixels. |
ctype |
string | No | - | Option to show buyers that paid using a particular point type. Should not be used if you only have one point type installed or if users can only pay using one point type. |
use_email |
int | No | 0 | By default avatars are loaded using the users ID (0) but you can select to show avatars based on their email instead (1). |
default |
string | No | - | Default image to use. Requires an image URL. If not used, the WordPress default one is used. |
alt |
string | No | - | Option to set the avatar images alt attribute. |
CSS Styling
.mycred-sell-this-buyers { }
Examples
Example 1: Default usage.
[mycred_content_buyer_avatars]
Example 2: Show 15 avatars instead of the default 10.
[mycred_content_buyer_avatars number=15]
Example 3: Change the avatar size to 100×100 pixel.
[mycred_content_buyer_avatars size=100]