기본 [activity-stream]
확장 숏코드 사용법 [activity-stream pagination=0 load_more=1 per_page=10 object="profile"]
(페이지네이션은 없애고, 더보기 버튼을 생성하고, 한 페이지에 10개씩 보여준다, 오브젝트는 프로필 관련만)
숫자는 바로 사용하면 되고, 문자는 쌍따옴표로 감싸준다.
코드 리스트
title(string) :- what should be the title of the activities section
pagination(int):- 0 or 1(do you want to hide or show the activity pagination at the bottom of the list)
display_comments(sting, int):- possible values are threaded|stream|0(use 0 to hide activity comments)
include(int|string):- individual activity id or comma separated list of activities, useful in case you want to list specific activities
exclude(int|string):-individual activity id or comma separated list of activities, useful in case you want to exclude specific activities from the list
sort(string):- ASC|DESC (how to sort the activities in ascending or descending order)
page (int):- which page to load, e.g 1st page or 10th page of activity
per_page(int):- How many activities per page(default is 5)
load_more(int) :- 0 or 1. Use load more button for loading the activities in current context.
max(int):- Limit the maximum no. of activities to be included in the list
scope(string):- – pre-built activity filters for a user (possible values are friends/groups/favorites/mentions)
user_id(int):- If you want to list a particular user’s activity
for(string):- User type you want to display for. Possible values ‘logged’, ‘displayed’, ‘author’.
role(string):- One of more WordPress roles. eg. ‘administrator’ or ‘administrator,editor’. It will filter the activity and list for the given roles only.
object(string):- object to filter on e.g. groups, profile, status, friends(what type of activity is this)
for_group(string):- specify a group slug. Only valid if the object=groups is specified
action(string):- action to filter on e.g. activity_update, new_forum_post, profile_updated(why this activity was created)
primary_id(int):- object ID to filter on e.g. a group_id or forum_id or blog_id etc. We will see the use in a minute.
secondary_id(int):- secondary object ID to filter on e.g. a post_id(I don’t think you are going to use it)
search_terms(String):- In case you want to list the results of activity search
allow_posting(int):- If you want to allow users to post. It will include the default activity posting form. It is experimental and may have issues on some of the themes.
hide_on_activity(int):- Default 1. Hide/show the shortcode content on activity pages(If you are using it in sidebar and want it to be visible on user/group/site activity page, set it to 0)
container_class(string):- Default ‘activity’ . Allows to change the class of the shortcode contents wrapper. If you have the hide_on_activity=0, then please set it to some other value than ‘activity'(May be ‘activities’ or something else). If you do not change it, On the user/group/site activity page, the activity filter will affect the content of the shotrcode. It is suggested to change it if hide_on_activity=0 is set.
참조 원문-https://buddydev.com/plugins/bp-activity-shortcode/