Skip to Content

Shortcode

Is a comprehensive collection of various visual and functional elements, which you can use in the post editor, text widgets or even in template files.

Usage

The Shortcode API makes it easy to create shortcodes that support attributes like this:

php
[aios_social_media_feed][/aios_social_media_feed]

OR

php
<?php echo do_shortcode('[aios_social_media_feed][/aios_social_media_feed]'); ?>

Social Media Feed

Return data feed

Attributes:

  • ajax - This will load the feed using AJAX method. Default: false
  • user_id - This will get the details and feed related to the user ID and only applicable for multiple accounts. Default: empty
  • limit - Number of posts per platform feed, this limit shouldn’t exceed the limit set in the AIOS Dashboard page. Default: 10
  • default-image - Default image if not available. Default: empty
  • truncated-length - Truncated string with specified width. Default: 0
  • trim-marker - This will display after the text is truncated, if truncated length is not 0. Default: ’…’
  • platform - Display specific platform. Accepted values separated by comma: facebook, instagrambusiness, instagrambasic, twitter, youtube | Default: empty

Platform Shortcode

These platform shorcode must be inside the [aios_social_media_feed]platform_shortcodes[/aios_social_media_feed].

All Recent Feed - Return recent feed for all platform, detail shortcode not available for this

php
[all_start][all_end]

Facebook Feed - Return account detail and feeds

php
[facebook_start][facebook_end]

Instagram Business Account Feed - Return account detail and feeds

php
[instagram_business_start][instagram_business_end]

Instagram Basic Account Feed - Return account detail and feeds

php
[instagram_basic_start][instagram_basic_end]

Tiktok Feed - Return account detail and feeds

php
[tiktok_start][tiktok_end]

Twitter Feed - Return account detail and feeds

php
[twitter_start][twitter_end]

YouTube Channel Feed - Return list of video depend on the playlist selected

php
[youtube_start][youtube_end]

Detail Shortcode

These detail shorcode must be inside the platform shortcode, each shortcode depend on the availability of the paltform.

Provider - Return provider name

php
[provider]

name - Return user name

php
[name]

image - Return profile image

php
[image]

about - Return description of personal/page

php
[about]

url - Permalink of the account

php
[url]

fan_count - # of Followers for Facebook platform

php
[fan_count]

followers_count - # of Followers for Instagram Business Account and Twitter platform

php
[followers_count]

follows_count - # of Follows for Instagram Business Account and Twitter platform

php
[follows_count]

friends_count - # of Friends for Twitter platform

php
[friends_count]

listed_count - # of Listed for Twitter platform

php
[listed_count]

favourites_count - # of Favourites for Twitter platform

php
[favourites_count]

statuses_count - # of Statuses for Twitter platform

php
[statuses_count]

viewCount - # of View for YouTube channel platform

php
[viewCount]

subscriberCount - # of Subscriber for YouTube channel platform

php
[subscriberCount]

videoCount - # of Video for YouTube channel platform

php
[videoCount]

Feed Shortcode

These shorcode must be inside the [loop_start]feed_shortcodes[loop_end].

post_provider - Post provider

php
[post_provider]

post_permalink - Post permalink

php
[post_permalink]

post_caption - Post caption

php
[post_caption]

post_caption_without_urls - Post caption stripped anchor tags

php
[post_caption_without_urls]

post_media_url - Attachment media url

php
[post_media_url]

post_media_video - Attachment media video

php
[post_media_video]

post_media_alt - Attachment alt tag

php
[post_media_alt]

post_media_permalink - Attachment permalink

php
[post_media_permalink]

post_full_date - Created date for full date

php
[post_full_date]

post_date_day - Created date for Day

php
[post_date_day]

post_date_day_nozero - Created date for Day without zero

php
[post_date_day_nozero]

post_date_day_text - Created date for Day in text

php
[post_date_day_text]

post_date_day_text_abbr - Created date for Day in text Abbreviation

php
[post_date_day_text_abbr]

post_date_month - Created date for Month in Text

php
[post_date_month]

post_date_month_abbr - Created date for Month in text abbreviation

php
[post_date_month_abbr]

post_date_month_num - Created date for Month in number

php
[post_date_month_num]

post_date_month_num_nozero - Created date for Month in number without zero

php
[post_date_month_num_nozero]

post_date_year_full - Created date for Year in full

php
[post_date_year_full]

post_date_year_short - Created date for Year in last two digits

php
[post_date_year_short]

post_elapsed_time - Created date converted to elapsed time

php
[post_elapsed_time]

post_title - Post title for YouTube video

php
[post_title]

post_view_count - # of Views for YouTube video

php
[post_view_count]

post_dislike_count - # of Dislike for YouTube video

php
[post_dislike_count]

post_favorite_count - # of Favorite for Tweets and YouTube video

php
[post_favorite_count]

post_retweet_count - # of Retweets for Tweets

php
[post_retweet_count]

post_like_count - # of Likes for Instagram Business, and Youtube

php
[post_like_count]

post_comments_count - # of Comment for Instagram Business, and Youtube

php
[post_comments_count]

post_media_autoplay - Display video tag with autoplay

php
[post_media_autoplay]

Full Usage

php
[aios_social_media_feed] [all_start] [loop_start] post_provider: [post_provider] post_permalink: [post_permalink] post_caption: [post_caption] post_caption_without_urls: [post_caption_without_urls] post_media_url: [post_media_url] post_media_video: [post_media_video] post_media_alt: [post_media_alt] post_media_permalink: [post_media_permalink] post_full_date: [post_full_date] post_date_day: [post_date_day] post_date_day_nozero: [post_date_day_nozero] post_date_day_text: [post_date_day_text] post_date_day_text_abbr: [post_date_day_text_abbr] post_date_month: [post_date_month] post_date_month_abbr: [post_date_month_abbr] post_date_month_num: [post_date_month_num] post_date_month_num_nozero: [post_date_month_num_nozero] post_date_year_full: [post_date_year_full] post_date_year_short: [post_date_year_short] post_elapsed_time: [post_elapsed_time] post_title: [post_title] post_view_count: [post_view_count] post_dislike_count: [post_dislike_count] post_favorite_count: [post_favorite_count] post_retweet_count: [post_retweet_count] post_like_count: [post_like_count] post_comments_count: [post_comments_count] post_favorite_count: [post_favorite_count] post_media_autoplay: [post_media_autoplay] [loop_end] [all_end] [facebook_start] provider: [provider] type: [type] name: [name] image: [image] about: [about] url: [url] fan_count: [fan_count] posts: [loop_start] post_provider: [post_provider] post_permalink: [post_permalink] post_caption: [post_caption] post_caption_without_urls: [post_caption_without_urls] post_media_url: [post_media_url] post_media_video: [post_media_video] post_media_alt: [post_media_alt] post_media_permalink: [post_media_permalink] post_full_date: [post_full_date] post_date_day: [post_date_day] post_date_day_nozero: [post_date_day_nozero] post_date_day_text: [post_date_day_text] post_date_day_text_abbr: [post_date_day_text_abbr] post_date_month: [post_date_month] post_date_month_abbr: [post_date_month_abbr] post_date_month_num: [post_date_month_num] post_date_month_num_nozero: [post_date_month_num_nozero] post_date_year_full: [post_date_year_full] post_date_year_short: [post_date_year_short] post_elapsed_time: [post_elapsed_time] post_media_autoplay: [post_media_autoplay] [loop_end] [facebook_end] [/aios_social_media_feed]
Last updated on