
內容簡介
增加了用於 BuddyPress XProfile 數據的短碼
以下是一些範例短碼:
按 ID 引用字段,以防名稱更改:
[xprofile field=12]
使用默認用戶檢測輸出城市(當前顯示的 BP 檔案,降級到當前頁面/文章的作者,降級到當前登錄的用戶):
[xprofile field=”City”]
按 ID 或用戶名稱輸出特定用戶的城市:
[xprofile field=”City” user=20]
[xprofile field=”City” user=”someusername”]
通過指定方法覆蓋默認用戶檢測:
輸出當前登錄的用戶的城市(如果沒有用戶登錄,則留空):
[xprofile field=”City” user=current]
輸出當前正在查看的頁面/文章的作者的城市:
[xprofile field=”City” user=author]
輸出當前顯示的 BuddyPress 檔案的城市:
[xprofile field=”City” user=displayed]
了解更多有關 BP XProfile Shortcode
外掛標籤
開發者團隊
原文外掛簡介
Adds Shortcode for BuddyPress XProfile data
For quick reference, here is a list of example shortcodes:
Reference field by ID in case name changes:
[xprofile field=12]
Output city using default user detection (currently displayed BP profile, fallback to author of current page/post, fallback to currently logged in user):
[xprofile field=”City”]
Output city for a specific user by ID or username:
[xprofile field=”City” user=20]
[xprofile field=”City” user=”someusername”]
Override the default user detection by specifying method:
Output city for the currently logged in user (blank if no user is logged in):
[xprofile field=”City” user=current]
Output city for the author of the current page/post being viewed:
[xprofile field=”City” user=author]
Output city for the currently displayed BuddyPress profile:
[xprofile field=”City” user=displayed]
Learn more about BP XProfile Shortcode
