Poka Review Plugin Documentation
Follow the instructions below to install and configure your PokaTheme!
Installation/Activation
Installation
The zip you just downloaded contains all the files you are going to need, in detail:
- Poka Review Plugin
- Documentation
Upload the poka-review-plugin.zip file which is inside your main zip via the WordPress Admin Panel.
To do so, go to “Plugins”>>”Add New” in the menu. Once you are at this page, select “Upload Plugin”, then “Choose File” to locate the .zip folder on your computer and select “Install Now.”
Activation
Once you have installed the plugin, you can go back to the “Plugins” page in the WordPress Admin Panel (“Plugins” > “Installed Plugins”) and select “Activate” Poka Review Plugin.
Plugin Settings
Affiliate Redirect Base
In this field you can enter the base for your hidden affiliate URLS. ( Defaults to “go”. E.g. https://yoursite.com/go/review1 )
Select visual style
You can select the style of your reviews here. Defaults to Light.
Light: This is the normal reviews style. Goes well with light background themes.
Dark: All reviews have a dark background. Goes well with dark background themes.
Half Image Style: You select an image that will be placed as a background at the review main body
Full Image Style: You select an image that will be placed as a background at the whole review.
No background style: Removes any background color from the reviews.
Select color option
Here you can set the plugin’s main color. Choose from 4 predefined colors or select your own color.
Select font family
Choose from the 5 available options the typography of your reviews.
Elements border radius
Configure the border radius of buttons, review boxes, tables etc.
**Note** Setting too big values may make the elements look overly circular.
Text Color
Select the color of the typography.
Base font size
Configure the base font size of the review elements.
**Note** Setting too big values is not recommended as it will make all the elements significantly larger.
Review button text
Set the text that will be displayed at every review button. It can be a translation of the original text or completely different.
Play button text
Set the text that will be displayed at every “play” button. It can be a translation of the original text or completely different.
Post types
Reviews
This is the post type for your affiliate reviews. It contains the affiliate fields box where you enter all the affiliate data, and the shortcode options, where you build the shortcodes to use anywhere in the site.
Affiliate fields
Bonus promo title
The bonus of the Review that is going to be used in widgets and shortcodes.
Free spins promo text
The free spins bonus of the review that is going to be used in the bonus box shortcode.
Custom Ordering
You can use custom ordering to make a review appear at a specific spot in a specific tablelist, provided that you select custom ordering as a sort option at that tablelist.
Review single URL
If you have a post/page you use as a single for this review enter here the URL
Affiliate URL
The link that will lead to affiliate website.
Affiliate key
The word you want to be displayed in the frontend in the URL structure.
Use only one word or use _ for multiple words. e.g. poker_site
Affiliate onclick
Execute a JavaScript when affiliate link is clicked.
(Below you can find examples for Google Analytics events)
Example Google Analytics Classic : _gaq.push([“_trackEvent”, “Button”, “Click”, “Casino name”]);
Example Google Analytics universal : ga(“send”, “event”, “Button”, “Click”, “Casino Name”);
(This version is used in the theme by default)
Select rating mode
Select from the 2 available rating modes, single rating in which you can enter your rating and it will work as a total review rating, and multiple rating if you want to present a more detailed rating for the review.
Affiliate small info
The text info that is going to be used in Review table.
Affiliate info list
The list that displays the information about the review. In order to display the info list in the content you can switch the Show info list field on. You can enter as many list items as you want.
Pros/cons
The list items for the Pros and Cons of the review. In order to display the Pros/Cons box in the content you can switch the Show pros/cons field on.
Review thumbnail
You can upload the affiliate logo here.
Affiliate thumbnails
You can upload screenshots from your review which will be displayed as a carousel. In order to display the carousel in the content you can switch the Show gallery field on.
Review Shortcode Options
You can define the parameters of the shortcode here, and once you publish the review, you can copy the generated shortcode and use it throughout the site.
Select Shortcode
Select the shortcode type, you can choose Poka Review Single which can be used at any page and can display all the available info, or choose Poka Review Bonus Box which is much smaller in size and displays less info, but is appropriate for small areas where you might want to promote a specific affiliate.
Shortcode layout
Choose from 5 different styles the layout of your review.
Shortcode size
The size of the review shortcode. Big is recommended for bigger areas, while small for smaller ones.
Shortcode title
Displays a title at the top of the shortcode.
Total score style
The style that total score is displayed.
Available Options:
- Percentage
- Number
- Number with stars
- Stars
Detailed rating style
The style that detailed rating is displayed.
Available Options:
- Bars
- Stars
Show info list
Shows/hides info list.
Show pros/cons
Shows/hides pros/cons.
Show gallery
Shows/hides gallery.
Shortcode Live Preview
After you have published the review, every change you make to the shortcode option will be displayd at the shortcode live preview. When you are happy with the results, copy the shortcode and paste it wherever you want in the site.
Review Tables
This is the post type for your affiliate review tables. It contains multiple options not only to select and sort the reviews to be displayed, but also to present the tables themselves.
Review tables tool
Select shortcode
Select the shortcode that you want to create, Poka review table list is used to create a bit review table for large content areas, while Poka review table list widget creates a smaller table better suited for narrow areas, such as the site sidebar.
Select source
From here you can select which reviews you want to display.
The available options are:
- Select Reviews: Select specifically by name which reviews you want to show
- Select Taxonomy: Show reviews only from a specific taxonomy
- All Reviews: Show all reviews.
Shortcode size
The overall size of the table list. For content areas smaller than 840px the “small” size is suggested.
Shortcode style
The style of the table list. Default is “normal”, but you can use “narrow” for smaller areas.
Order by
Select the order of your reviews.
Available Options:
- Title
- Date
- Rating
- Custom (You can specify the order at the review custom order field)
Number of review to show
Enter -1 to show all reviews.
Total score style
How the total score is displayed.
Available Options:
- Percentage
- Number
- Number with stars
- Stars
Show counter
Show/hide numbering on table elements.
Shortcode Live Preview
After you have published the table list, every change you make to the shortcode option will be displayd at the shortcode live preview. When you are happy with the results, copy the shortcode and paste it wherever you want in the site.
Shortcodes
The above mentioned shortcodes are listed here along with their parameters.
[pokareview_single]
Parameters
- id: The id of the review you want to show
- layout: The layout style of the review (Default value: style1)
- show_title: Show a title above the review
- score_style: The style of the score (Default value: percentage)
- detailed_rating_style: The style of the detailed rating (Default value: bars)
- show_pros_cons: Show the pros/cons (Default: false)
- show_gallery: Show the gallery (Default: false)
- show_info_list: Show the info list (Default: false)
- size: Size of the review (Default: big)
Example:
[pokareview_single id=”157″ layout=”style5″ show_title=”Test tuks” score_style=”number_stars” detailed_rating_style=”stars” show_pros_cons=”true” show_gallery=”true” show_infolist=”true” size=”big”]
[pokareview_bonusbox]
Parameters
- id: The id of the review you want to show
- layout: The layout style of the review (Default value: style1)
- score_style: The style of the score (Default value: percentage)
Example:
[pokareview_bonusbox id=”157″ layout=”style1″ score_style=”percentage”]
[pokareview_tablelist]
Parameters
- sort: How you want the reviews sorted (Default: title)
- num: The number of reviews to show (Default: 10)
- reviews: Enter the ids of the reviews you want to show separated by commas
- size: The size of the table (Default: big)
- style: The style of the table (Default: normal)
- counter: Show the numbering in table elements (Default: true)
- score_style: The score style (Default: percentage)
Example:
[pokareview_tablelist sort=”rating” num=”24″ reviews=”102,104,127,157,153″ size=”big” style=”normal” counter=”true” score_style=”percentage”]
[pokareview_tablelist_widget]
Parameters
- sort: How you want the reviews sorted (Default: title)
- num: The number of reviews to show (Default: 10)
- reviews: Enter the ids of the reviews you want to show separated by commas
- style: The style of the table (Default: normal)
- counter: Show the numbering in table elements (Default: true)
Example:
[pokareview_tablelist_widget sort=”rating” num=”24″ reviews=”102,104,127,157,153″ style=”normal” counter=”true”]
Hooks/API
Filters
shortcodes_single_array
Use this filter to add more shortcodes to a single review.
add_filter('prp/shortcodes_single_array','my_override_function'); function my_override_function($shortcodes_single) { $shortcodes_single = array( 'pokareview_single' => "Poka Review Single", 'pokareview_bonusbox' => "Poka Review Bonus Box", 'my_new_shortcode' => "My New Shortcode" ); return $shortcodes_single; }
shortcodes_table_array
Use this filter to add more shortcodes to a review table.
add_filter('prp/shortcodes_table_array','my_override_function'); function my_override_function($shortcodes_table) { $shortcodes_table = array( 'pokareview_tablelist' => 'Poka Review Table List', 'pokareview_tablelist_widget' => 'Poka Review Table List Widget', 'my_new_shortcode' => "My New Shortcode" ); return $shortcodes_table; }
sc_preview
Use this filter to preview a custom shortcode.
add_filter( 'prp/sc_preview', 'my_override_function', 10, 2 ); function my_override_function( $response, $fieldsValues ){ //The shortcode that is being previewed $select_shortcode = $fieldsValues['select_shortcode']; //If the previewed shortcode is not the one we made, return if( $select_shortcode !== 'my_new_shortcode' ) return $response; $response = array(); $html = ''; $response['html'] = '<div class="prp-content">'; $response['html'] .= do_shortcode('[my_new_shortcode]'); $response['html'] .= '</div>'; $response['shortcode'] = '[my_new_shortcode]'; return $response; }
body_class
Use this filter to add custom classes to body
add_filter('prp/body_class' , 'my_override_function'); function my_override_function( $classes ) { array_push( $classes , 'my_new_class' ); return $classes; }
Actions
load_fields
Use this action to add a new custom field to a shortcode.
In the example we add a new field to single review shortcode.
add_action('prp/load_fields', 'add_new_acf_field'); function add_new_acf_field(){ if( function_exists('acf_add_local_field') ): acf_add_local_field(array( "key" => 'field_5b3b67117ivjt', "label" => 'Test Field', "name" => 'test_field', "type" => 'text', "parent" => 'group_5b3b66d599f4b', "conditional_logic" => array( array( array( "field" => 'field_5b3b66f071af1', "operator" => '==', "value" => 'pokareview_single', ), ), ), )); endif; }
add_field_type
Use this action to add a new field type. ( Requires knowledge on the ACF API )
add_action('prp/add_field_type' , 'add_new_field_type'); function add_new_field_type() { new my_new_field_type(); }
Poka Review Plugin / Casino Ace Theme Compatibility
If you are using Casino Ace Theme along with the plugin, and you want to override some of the plugins actions, we recommend including your actions after
/** * Poka Review Plugin functions */ require_once ( get_theme_file_path( '/inc/prp-functions.php' ) ); /**********************************************************************/
In functions.php