1. Home
  2. Docs
  3. Podcast Player Documentat...
  4. Podcast PRO
  5. Shortcode – From Audio

Shortcode – From Audio

In addition to the shortcode features in the free plugin, pro plugin also support adding podcast player from a single audio URL. We need to learn a few more shortcode attributes to add our single episode player shortcode. We do not need to enter feed_url in this shortcode.

Instructions and Attributes list for podcast player pro shortcode

Easily display Podast player using Shortcode as mentioned in following steps. Podcast Player will be displayed from a single audio file.

Minimum Setup

[podcastplayer fetch_method='link'  mediasrc='url_of_media_file']

Advanced Setup

[podcastplayer fetch_method='link' mediasrc='url_of_media_file' episodetitle='title_for_the_episode' episodelink='episode_link_for_sharing']

For advanced setup, there are many shortcode parameters you can use to customise display of your podcast player. Shortcode parameters mentioned in above example is just for demonstration purpose. You need not use all of the parameters mentioned in below table, just use whatever is required to achieve a particular customization.

Complete list of parameters is as below,

Minimum required attributes

AttributeDefault ValueDescription
fetch_method‘link’How to fetch podcast episodes. Options:
feed (fetch from feed url),
post (fetch from post or post type),
link (fetch from audio or video URL)
mediasrcAudio or Video media URL (i.e., mp3, mp4 etc. file url).

Customize Podcast Content

AttributeDefault ValueDescription
episodetitleTitle of the episode
episodelinkLink of the epsiode for social sharing (optional)
cover_image_urlYour Podcast’s cover image url
podcast_menuAny WordPress menu’s name, ID OR slug
number10Number of podcasts episodes to be displayed at a time
excerpt_length18Excerpt length (only with default and premium display style)

Podcast Subscription Links

AttributeDefault ValueDescription
apple_subApple podcast subscription link
google_subGoogle podcast subscription link
spotify_subSpotify podcast subscription link
breaker_subBreaker subscription link
castbox_subCastbox subscription link
castro_subCastro subscription link
iheart_subiHeart subscription link
overcast_subOvercast subscription link
castbox_subCastbox subscription link
pocketcasts_subPocketcasts subscription link
podcastaddict_subPodcastaddict subscription link
podchaser_subPodchaser subscription link
radiopublic_subRadiopublic subscription link
soundcloud_subSoundcloud subscription link
stitcher_subStitcher subscription link
tunein_subTunein subscription link
youtube_subYouTube subscription link
bullhorn_subBullHorn subscription link
podbean_subPodbean subscription link
playerfm_subPlayerFM subscription link

Show / Hide Player Items

AttributeDefault ValueDescription
hide_downloadfalseShow/ Hide podcast episode download link
hide_socialfalseShow/ Hide podcast episode social sharing links

Podcast player styling

AttributeDefault ValueDescription
accent_color#65b84fPodcast player’s accent color hexcode
display_stylePodcast player display style. Options:
” (for default view OR do not use this attribute),
legacy (for legacy view),
gv1 (for Grid View),
gv2 (for Material Grid View),
lv1 (for list view),
lv2 (for small list view),
lv3 (for minimalist list view),
lv4 (for individual list view)
bgcolorBackground Color hex code (i.e., #262626).
txtcolorMake light text color for grid and list view (use txtcolor=”ltext”).
aspect_ratio‘squr’Featured image aspect ratio (only with grid view and list view display style).
Options:
land1 (for landscape 4:3),
land2 (for landscape 3:2),
port1 (for portrait 3:4),
port2 (for portrait 2:3),
wdscrn (for widescreen 16:9),
squr (for square 1:1)
crop_method‘centercrop’Featured image crop method (only with grid view and list view display style). Options, topleftcrop, topcentercrop, centercrop, bottomleftcrop, bottomcentercrop
grid_columns3Number of grid columns (only with grid view display style)
font_familyName of google font to be loaded.

Custom Audio Message

AttributeDefault ValueDescription
audio_msgURL of mp3 audio file which is to be played before, after or during podcast episodes.
play_freq0After how many episodes the audio should be replayed.
msg_start‘start’When to start playing the audio message. Possible values are:
start (Play at the beginning of the episode.)
end (Play at the end of the episode.)
custom (Play at any given custom time. Check below mentioned ‘msg_time’ option below)
msg_time’00:00:00′Required only if above msg_start is set as ‘custom’. Enter time at which the audio should be played in hh:mm:ss format.
msg_textMessage text to be displayed while playing audio.
Was this article helpful to you? Yes No

How can we help?