WP Radio Plugin features multiple shortcodes to display various sections on any post/ page in a very flexible way. We will discuss each and every shortcode feature and its usage in the following.
Station Listing Shortcode
You can display station lists using our built-in shortcode. This allows visitors to view all stations in one place.
To display the radio station listing use [wp_radio_listing] shortcode.
This shortcode supports three optional attributes, those are country, genre, and col. Both are optional.
In the country attribute, you can pass comma-separated country codes (country category slug) to filter the listing by the given countries. In the genre attribute, you can pass comma-separated genre names (genre category slug) to filter the listing.
If the listing layout is set to the grid then you can pass the number of columns of the grid to the col attribute.
Example: [wp_radio_listing country=”us, ru, in, bd” genre=”rock,news,rock”]
Radio Player Shortcode
Radio Player Shortcode allows displaying Radio Player anywhere on your page or post. This allows visitors easily interact and play with it.
To display the radio player use [wp_radio_player] shortcode. This Shortcode supports two optional attributes those are id & next_prev.
In the id attribute, you can pass the radio station id to display the player for the given station. In the next_prev attribute, you can pass the value of true to display the next/previous button to change the radio station of the player.
Example: [wp_radio_player id=”1″ next_prev=”true”]
Radio Station Shortcode
If you want to display a single radio station, Radio Station Shortcode is a handy option for you.
To display a single radio station with a play button use the [wp_radio_station] shortcode. This shortcode required an id attribute. In the id attribute, you have to use the radio station id which you want to display.
Example: [wp_radio_station id=”1″]
Advanced Station Search Shortcode
WP Radio features an advanced station searching ability that allows users to search stations by keywords, country, and genre.
Use this shortcode anywhere for displaying the station search form. This shortcode supports two attributes **(country_filter and genre_filter)**. You have to pass true/ false values to the attributes for showing/ hiding the country and genre filter in the search form.
Example: [wp_radio_search_form country_filter=”true” genre_filter=”false”]
Trending Stations Shortcode
The most played stations can be displayed on any page or post as Trending Stations.
To display the trending stations, use the [wp_radio_trending] shortcode. This Shortcode supports 2 optional attributes for filtering the listing. Those are count & country attributes.
Use the count attribute to limit how many Radio Stations you want to show in the listing. You can pass any valid number to this attribute. Use country attribute to filter the listing by country. You can pass comma-separated country codes (country archive slug) in this attribute.
Example: [wp_radio_trending count=”10″ country=”us”]
Featured Stations Shortcode
WP Radio plugin has a feature included that enables displaying featured stations inside any page or post.
To display the featured stations, use the [wp_radio_featured] shortcode. This Shortcode supports the same attributes as the [wp_radio_featured] shortcode.
Example: [wp_radio_featured count=”10″ country=”us”]
Country List Shortcode
Using the country list shortcode you can display all the imported station countries in a list view.
To display all the imported station countries, use the [wp_radio_country_list] shortcode. This shortcode supports two optional attributes, those are style and columns.
Use style attribute to change the style of the listing. You can the value of vertical or horizontal.
Use the columns attribute to change the number of columns of the country list.
Example: [wp_radio_country_list style=”horizontal” columns=”3″ ]
User Favorite Stations Shortcode
You can display user favorite stations by using User Favorite Stations Shortcode.
To display the favorite stations of users, use the [wp_radio_user_favorites] shortcode.
You must activate the WP Radio User Frontend Addon to use this shortcode.
Example: [wp_radio_user_favorites]