PokaTheme Documentation

Follow the instructions below to install and configure your PokaTheme!

Installation


Installation

The zip you just downloaded contains all the files you are going to need, in detail:

  • PokaTheme v4 theme
  • Your child theme
  • Documentation

Upload the pokatheme.zip file which is inside your main zip via the the WordPress Admin Panel.
To do so, go to “Appearance” > “Themes” in the menu, then select the “Install Themes” tab at
the top of the page. Once you are at this page, select “Upload,” then “Choose File” to locate the
.zip folder on your computer and select “Install Now.”

Activation

Once you have installed the theme, you can go back to the “Themes” page in
the WordPress Admin Panel (“Appearance” > “Themes”) and select “Activate” PokaTheme.

Making changes to your theme

There are two basic ways that you can make changes to the theme. The way you choose depends on the type of change you want to make.

  • If you just want to add Css code, then you can do it from the corresponding Customizer field called Additional Css.
  • If the changes you want to make concern changes to hooks or override templates, then it is highly recommended to install the provided Child theme and make all the changes you want there in order to have the ability to update PokaTheme in future versions without losing your changes.

    • The theme is using a lot of actions/hooks so you can override/change most of the Poka theme functions in your child theme. For further help about Theme API see the Hooks section in the documentation or contact us in support forum.

 

Importing demo content

With the help of “One Click Demo Import” plugin importing demo content is very easy in 4 steps:

  • Activate PokaTheme v4 theme
  • Install and activate One Click Demo Import
  • After the activation navigate to “Poka Demo Import ” page that is under Appearance Tab On Dashboard.
  • You will see all the available options between demos. Each Demo has 2 options, “Preview Demo” to navigate you to the demo page and “Import Demo”.
  • Choose “Import Demo” and then will be asked to confirm importing, just press “Continue Importing” and wait until it finishes.

 

Migrating PokaTheme v3 to PokaTheme v4

Our new version of PokaTheme (v4) uses Gutenberg blocks.Gutenberg is the new generation of Editors on WordPress.It is lightweight,responsive and more user-friendly.Classic Editor support will end soon by WordPress in the near future.That said migration from our previous versions of PokaTheme to new one is not possible with an automatic way.You can migrate your old theme manually.
You can Find more information on this link.

 

Customize

To get to the WordPress Customize, navigate to Appearance / Customize from your WordPress dashboard. You will be taken directly to the Customize interface, with your theme preview on the right, and the Customize menu on the left.
Customize in PokaTheme gives you the opportunity

  • to define the basic information and functionalities of the site through the available options in the subcategories of Theme Settings, Translations & Site Identity
  • to edit the layout of the site through the available options in the subcategories of Visual Settings

 

Customize > Theme Settings > General


Google analytics code
If you want visitor statistics in this field you enter the Google analytics code. You can get yours from : http://www.google.com/analytics/
Youtube Link
The link to your social account that is going to appear in the header and footer. If you leave it empty then the icon is going to hide.
Facebook Link
The link to your social account that is going to appear in the header and footer. If you leave it empty then the icon is going to hide.
Twitter Link
The link to your social account that is going to appear in the header and footer. If you leave it empty then the icon is going to hide.
Instagram Link
The link to your social account that is going to appear in the header and footer. If you leave it empty then the icon is going to hide.
Linkedin Link
The link to your social account that is going to appear in the header and footer. If you leave it empty then the icon is going to hide.
Skype Link
The link to your social account that is going to appear in the header and footer. If you leave it empty then the icon is going to hide.
Affiliate redirect link folder
All the Reviews that contain an affiliate link use a specific URL structure to hide the affiliate link to the visitor. In this field you can set the URL structure for your affiliate links.
For example:ww.yoursite.com/go/affiliate_name.
Default value: go.
Show related articles in posts page
If you want the related posts’ section to appear at the bottom of your posts’ single page check this option.
(Related articles are considered articles in the same category as the current article)
Allow users to comment in posts
If you want users to comment in your posts check this option. (It is recommended for users to be logged in to comment.)
Allow users to comment in reviews
If you want comments in your reviews check this option. (It is recommended for users to be logged in to comment.)
Enable Geolocation
Check this field if you want to enable the Poka Geolocation plugin. For further information about the Poka Geolocation plugin see the Poka Gelocation section in the documentation.
Enable FAQs
Check this field if you want to enable FAQs Custom Post Type. By activating this functionality you have the ability to use the FAQs that you have created in any part of the site, using the corresponding Gutenberg Block which is called PokaTheme FAQ.
Enable jQuery Migrate
If you experience any issues with plugins that haven’t been updated for a long time and use older version jQuery you can enable this option and jQuery migrate will be added to your site. If everything works as expected you should leave it unchecked because jQuery migrate is adding unnecessary load to your site.


Customize > Theme Settings > Banners


Banner fullwidth top
This is the banner available space between the main content and the site header. The available width in desktop mode is 1180px and you can place your banner snippet or an image with a link.
Banner Snippet Example:

   

Image With Link Example:



* You can hide the banner at post pages / review pages / posts categories / reviews categories, selecting the appropriate rules in the checkboxes.
Banner fullwidth bottom
This is the banner available space after the main content and before the site footer area. The available width in desktop mode is 1180px and you can place your banner snippet or an image with a link.
Banner Snippet Example:

Image With Link Example:

* You can hide the banner at post pages / review pages / posts categories / reviews categories, selecting the appropriate rules in the checkboxes.


Customize > Theme Settings > Terms and Conditions


You can handle the Terms & Conditions functionality from here.
Enable “Terms and Conditions” functionality
You can switch terms and conditions on/off from here.
Enable “Terms and Conditions” tooltip
If you switch this on, the terms and conditions text will be displayed inside a tooltip which is triggered when the user hovers the text under any affiliate button, otherwise it will appear as regular text under all affiliates sections.
Text under each affiliate button
Here you can enter the text that appears under all affiliate buttons and triggers the Terms & Conditions popup.
Note: The above will apply only to reviews that you have entered Terms & Conditions text.


Customize > Theme Settings > Footer


Footer form area (left)
The content you want to display in the left side of the footer area. You can enter anything you wish, for example the social links’ shortcode.
Footer form area (right)
The content you want to display in the right side of the footer area. You can enter anything you wish, for example the subscription form’s shortcode.
Footer copyright area
In this field you can enter the copyright text. This text will be displayed at the bottom of the website.
Footer Images
In this section you can add as many photos as you want with the Add new field button, so that they appear in the footer.
There are two ways to do this:
Image field : In this field you can enter the url of the photo you want to appear.
Upload Image : Upload an image from your media.


Customize > Visual Settings > General


Header style
You can select how your header should look by selecting one of the two available header styles.
Hide breadcrumbs
Check to hide breadcrumbs.
Override reviews breadcrumb link
When you are in a review page and you have enabled breadcrumbs the parent link is the archives page of reviews. If you want to override this link with your own page you can select it in this dropdown.
Sidebar position (left/right)
Choose the sidebar’s position left or right.
Sticky sidebar
Check to enable sticky sidebar functionality.
Theme elements border radius
Set the theme elements’ border radius. Default value 8.


Customize > Visual Settings > Colors


Header background color
The header’s background color.
Header secondary background color
The header’s secondary background color, for header styles that a secondary color exists.
Header text color
The header’s text color.
Header text color hover
The header’s text color on hover and when a header element is active.
Site background color
The background color of your site.
Main color
The main color of your site.
Secondary color
The secondary color of your site.
Text color
The text’s color.
Footer color
The footer’s background color.
Boxes background color
The boxes’ background color.
Boxes secondary background color
The boxes’ secondary background color.
Boxes text color
The boxes’ text color.


Customize > Visual Settings > Buttons


Primary button color
The primary buttons’ color.
Primary button text color
The primary buttons’ text color.
Secondary button color
The secondary buttons’ color.
Secondary button text color
The secondary buttons’ text color.
Border radius (in pixels)
The secondary buttons’ text color.
Font weight
Select the buttons’ font weight.
Buttons text uppercase
Check this field to convert buttons’ text to uppercase letters.


Customize > Visual Settings > Fonts


Base font size (in pixels)
The base fonts size of your site. If you want to make your fonts bigger/smaller because of another font family this is the setting you should tweak. The default value is 16.
Main Font Family
Select the main font family.
Headings Font Family
Select headings’ font family.
Headings Font Weight
Select headings’ font weight.


Customize > Visual Settings > Reviews


Review style
Select one of the three available styles for the reviews pages. You can override this option for a specific review using the Affiliates Fields’ Review Template Style.
Taxonomy Review style
Select one of the eight available styles for the reviews’ taxonomies.
Taxonomy hide sidebar
Check this field to hide the sidebar in the reviews’ single page.
Hide author box
Check this field to hide the author box in the reviews’ single page.
Hide related reviews
Check this field to hide related reviews in the reviews’ single page.


Customize > Visual Settings > Posts


Display sidebar on single
Check this field to display sidebar on posts’ single page.
Display sidebar on Category
Check this field to display the sidebar on posts’ category page .
Category Style
You can select one of the two available styles for the posts’ category page.
Category Description Length
The maximum number of words for each description.
Category Show Featured Image
Select “No” to hide posts’ featured image. Default: “Yes”
This option is available only on Category Style 1
Category Description Use Excerpt
Select “Yes” if you want to use excerpt instead of truncated content. Default: “No”
Category Show Author
Select “No” if you want to hide the author of the post on the category page. Default “Yes”
Category Show Post Meta
Select “No” if you want to hide the posts’ meta information (date, views, etc ..) on the category page. Default “Yes”
Category Grid
You can select one of the two available options for the category’s page grid columns.
Default “2 Columns”
This option is available only on Category Style 1
Category Block Layout
You can select one of the two available options for the category’s block layout.
Default “Vertical”
This option is available only on 1 Column Category Grid.


Customize > Translations


Review button text
You can change the text in all the “Review” buttons in the site.
Play now button text
You can change the text in all the “Play now” buttons on the site.
Review post type slug
With this field you can easily change the “Review” post type slug in the URL of your reviews. All PokaTheme v4 sites display their reviews under the URL structure domain/review/review-title, now with this field you can add your own custom review slug. Please don’t use white spaces and use only underscores.After saving the options please refresh your permalinks by clicking “Save” to Settings/Permalinks.
For example : domain/casino_paris/review-title
Notice
Poka theme uses WordPress official translations management system using PO/MO files and if
you want to completely translate your site to a different language this is the way to go.
By using the options in Translations settings overrides PO/MO files, if you want to use PO/MO
files just leave the buttons fields in translation settings empty.
More information about creating/editing language packs you can find here :

How to create/edit language packs


Customize > Site Identity


Logo
Set the logo of your site.
Site Title
Define the site’s title.
Tag Line
Define the site’s tagline. Default “Just another WordPress site”
Site Icon
Set site’s favicon.
Favicon is what you see in browser tabs and bookmark bars.


Post Types

Posts

You can use Posts in order to create news, video posts, tutorials etc and whatever else you need. You can create categories and display the posts with the category view. You can also create tags to group your posts, based on similar details.


Pages
This is the post type for the pages of your site.
Enable Sidebar
Enable option if you want to display the sidebar on your page.
Hide banner top
Enable option if you need to hide banner top on your page.
Hide banner bottom
Enable option if you need to hide banner bottom on your page.


Reviews
This is the post type for your affiliates’ reviews. This post type has the metabox Affiliate fields where you can find all the available settings for each review.
Affiliate link
In this field you can find all the affiliate links you have created in Affiliate links post type. This is the affiliate link for your review when the user clicks “Review”.
Affiliate Bonus
The bonus of the Affiliate that is going to be used in the Review page, Gutenberg Blocks and shortcodes.
Affiliate Rating
The rating of the Affiliate with a range of 1-5 including decimal numbers in order to display the stars in Review page and Gutenberg Blocks.
Affiliate Ratings Base Number
Set the base number if you want your reviews not to start from zero.
Affiliate Rating Override
If you want to display your rating instead of user ratings for this specific review, check this field.
Review Template Style
If you want to override the style for this specific review you can select the style from this dropdown.
Affiliate Tag
The affiliate tag of that is going to be used in the Review page, Gutenberg Blocks and shortcodes.
Affiliate Tag Color
The background color of the affiliate’s tag.
Affiliate Background Color
The background color of the affiliate’s logo box.
Affiliate Overview List
The affiliate overview list that is going to be displayed in the Review page. You can add as many overview items as you want with the Add row button.
Item Title : refers to Overview List Item Title
Item Value : refers to Overview List Item Description
Affiliate Pros
The list items for the Pros of the review that are going to be displayed in Review Page, Gutenberg Blocks and shortcodes.You can add as many Props items as you want with the Add row button.
Affiliate Cons
The list items for the Cons of the review that is going to be displayed in Review Page, Gutenberg Blocks and shortcodes. You can add as many Cons items as you want with the Add row button.
Affiliate Description
The affiliate description that is going to be used in Gutenberg Blocks and shortcodes.
Affiliate Terms
The affiliate terms that are going to be used in Review Page, Gutenberg Blocks and shortcodes.


Affiliate Links
This is the post type for all of your affiliate links. First you create the affiliate link and then you associate it with a Review with Affiliate link dropdown in Review Page.
The idea behind this structure is to have a separate Post type for the affiliate links in order to give you the option to use each affiliate link in multiple Reviews.
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 link
The link you want the “Play now” button to lead to which is the target link you have from your affiliate associate.
Affiliate onclick event
Execute a JavaScript when the 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)


FAQs
This is the post type for all of your FAQs. First you create the FAQ and then you can place it anywhere using the corresponding Gutenberg Block which is called PokaTheme FAQ. You can add as many questions and answers as you want with the Add Row button.
The idea behind this structure is to have a separate Post type for the FAQs in order to give you the option to use each FAQ in multiple pages.
Question : The question of the FAQ item.
Answer : The answer of the FAQ item.
Open : If you want this FAQ item opened, check this field.


Gutenberg Blocks

PokaTheme in this new version has created some ready-made custom Gutenberg Blocks which you can use as tools to build your pages, your posts and your entire site! Each of these blocks can be modified through its various options. In case you do not want to use blocks but shortcodes, each block corresponds to a shortcode. In the following sections there is a detailed analysis of the options of each block and in the end follows the corresponding shortcode.


PokaTheme Posts List


This block is used to display a Post List. You can modify the number of posts that appear, the number of layout’s columns, select a specific category to display posts, use posts’ excerpt instead of posts’ truncated content, load posts with ajax functionality. Also you have the ability to show or hide the “read more” button, posts’ featured image, posts’ meta information, posts’ author. Last but not least you can set the descriptions’ length, write your own text for the “Read more” button and display posts horizontally.
Number of Posts : The number of the posts you want to display. If you need to display all available posts enter -1.
Columns : You can select one of the four available options to set the columns of the Posts List layout.
Select Category : If you want to display posts from a specific category choose the category from this dropdown.
Show “read more” Button: Check this field to show the read more button when a specific category is set.
Show featured image : Check this field to display posts’ featured image.
Show post meta : Check this field to display posts’ meta data (date, views, etc ..).
Show author : Check this field to display posts’ authors.
Show horizontally : Check this field to display posts horizontally.
Use excerpt instead of truncated content : Check this field to display post’s excerpt instead of truncated content but if a post does not have excerpt then truncated text will appear.
Load more posts with AJAX : You can allow users to load more posts with ajax.
Description length : The maximum number of words for each description/excerpt.
“Read more” text : Write your own text for the “Read more”/”Show more” buttons.
The corresponding shortcode of this block is as follows:
[posts_list style=”” num=”” columns=”” cat=”” descr_excerpt=”” descr_length=”” read_more_show=”” read_more_text=”” ajax_load_more=”” show_author=”” show_featured_image=”” show_post_meta=”” horizontal=”” reverse=””’]


PokaTheme Featured Videos


This block is used to display Featured Videos. You can select a specific category from which posts will appear or select specific posts to display.
Select Category : If you want to display posts from a specific category choose the category from this dropdown.
Select Posts : If you want to display specific posts select them from this dropdown, the maximum number you can select is three.
The corresponding shortcode of this block is as follows:
[featured_videos cat=”” ids=””]


PokaTheme FAQ


This block is used to display FAQs which have been created by the corresponding custom post type. You can select the FAQ you want to display and set the title element type.
Select and FAQ : Choose a FAQ to be displayed from the list of options in the dropdown menu. This dropdown contains all the FAQs created by the corresponding Custom Post Type.
Title element type : You can select one of the three available options to set the title’s element type.
The corresponding shortcode of this block is as follows:
[faq id=”” title_el=””]


PokaTheme Carousel


This block is used to display a carousel. You can modify the type of the elements that appear, the style of the carousel and the number of items per row.
Type : You can select one of the two available element types that you want to display.
Style : You can select one of the two available styles for the carousel.
Carousel items per row : In this field you can set the number of carousel items per row.
The corresponding shortcode of this block is as follows:
[carousel type=”” style=”” num=””]


PokaTheme Button


This block is used to display a button. You can modify its appearance and its text, to choose if you want an icon to appear, you can also set the url of the link that will contain and where to open the linked document.
Button Text : The text of the button.
Button URL: The url of the button.
Button Size : You can select one of the three available button sizes.
Full width : If you want your button to occupy the full width of the container check this field.
Style : You can select one of the three available button styles.
Relationship Attribute (rel) : You can select one of the fourteen available relationship attribute options from this dropdown.
Target Attribute (target) : You can select one of the five target attribute options.
Icon Class : If you want to display an icon in this button, type the icon class in this field. You can find all poka icons here: https://pokatheme.com/topic/poka-icon-library/
Icon Size : You can select one of the two available icon sizes.
Choose an Image Icon : Choose an image icon from your media or upload it.
Icon alignment : You can select one of the two available icon alignments.
The corresponding shortcode of this block is as follows:
[btn btn_size=”” full_width=”” style=”” href=”” rel=”” target=”” icon=”” icon_size=”” icon_alignment=””] Title [/btn]


PokaTheme Box text


This block is used to display a box text. You can set the color of the box, its content, you can also choose if you want to use uppertitle or icon and set their color.
Box Type : You can select one of the two available box type options.
Icon Class : The icon class of the icon you want to display. Only available for Icon Box Type. You can find all poka icons here: https://pokatheme.com/topic/poka-icon-library/
Uppertitle : The uppertitle. Only available for Uppertitle Box Type.
Title : The title of the box text.
Text : The text of the box text.
Box Color : Choose the box’s color.
Uppertitle Color : Choose the uppetitle’s or icon’s color.
The corresponding shortcode of this block is as follows:
[box_text icon=”” uppertitle=”” title=”” color=”” uppertitle_color=””] Text [/box_text]


PokaTheme Affiliates Table


This block is used to display the affiliates table. You can modify the number of affiliates that appear, define a specific category from which affiliates will appear, display specific reviews, choose the style you want and the ordering method. Also you can enable or disable the table sorting filters, the affiliates counter and the overall rating.
Num : The number of affiliates you want to display. If you need to display all available Posts enter -1.
Select Affiliate Category : If you want to display affiliates from a specific category, select the category from this dropdown.
Sort : You can select the ordering of the affiliates.
Logo affiliate link : Check this field to convert logo image into a link of the review.
Select Reviews : If you want to display specific reviews, select them from this dropdown.
Show Counter : Check this field to display the counter icon.
Show Rating : Check this field to display the affiliates’ ratings.
Show Table Sorting : Check this field to display table’s sorting options.
Enable GEOlocation : Check this field if you want to display only allowed affiliates of the current country.
Style : You can select one of the five available styles for the Affiliates Table.
The corresponding shortcode of this block is as follows:
[affiliates_table num=”” cat=”” sort=”” logo_aff_link=”” reviews=”” show_counter=”” show_rating=”” show_table_sorting=”” css_class=”” style=””]


PokaTheme Single Affiliate


This block is used to display a Single Affiliate. You can choose its style and select the affiliate you want to display.
Select an affiliate : From this dropdown select the affiliate you want to display.
Style: You can select one of the ten available styles for the Single Affiliate layout.
The corresponding shortcode of this block is as follows:
[affiliates_single id=”” style=””]


PokaTheme Affiliates Search


This block is used to display an ajax search form about affiliates. Υou can modify the placeholder and choose if you want to display affiliates results only from a specific category.
Placeholder : The placeholder of the search form.
Category : If you want the search form to display results only from a specific affiliate category, select the category from this dropdown.
The corresponding shortcode of this block is as follows:
[affiliates_search placeholder=”” cat=””]


PokaTheme Affiliates List


This block is used to display an affiliates’ list. You can modify the number of affiliates that appear, define a specific category from which affiliates will appear, display specific reviews, choose the style you want, the sorting method and the number of layout’s columns.
Styles : You can select one of the four available styles for the Affiliates List.
Num : The number of affiliates you want to display. If you need to display all available affiliates enter -1.
Select Affiliate Category : If you want the Affiliates List to display results only from a certain category, select the category from this dropdown.
Sort : You can select the ordering of the Affiliates List.
Columns: You can select one of the six available options to set the number of columns.
Select Reviews: If you want to display specific reviews, select them from this dropdown.
Enable GEOlocation : Check this field if you want to display only allowed affiliates of the current country.
The corresponding shortcode of this block is as follows:
[affiliates_list style=”” num=”” cat=”” sort=”” columns=”” reviews=””]


PokaTheme Featured Affiliates


This block is used to display featured affiliates. You can select which specific Reviews you want to display, choose the Thumbnails’ links and enter the Featured title in the middle.
Select Reviews : If you want to display specific reviews, select them from this dropdown.
Thumbnail link : You can select one of the three available thumbnail’s link options.
Featured title : The title of the featured review in the middle.
The corresponding shortcode of this block is as follows:
[affiliates_featured ids=”” thumb_link=”” featured_title=””]


Widgets

Poka Posts

This widget is used to display posts. You can modify the title, choose the style of the widget, choose the ordering method of the posts, define the number of posts you want to display, define a specific category from which posts will appear, or display only specific posts.
Title: The title of the widget.
Style: You can select one of the three available options styles for the widget.
Order By: You can select the two available ordering methods.
Number of Posts: The number of the posts you want to display. If you need to display all available posts enter -1.
Category ID of Posts: If you want the Poka Posts widget to display results only from a certain category, type the ID of the category in this field.
Display only specific posts (For example: 12,8,20): If you want to display specific posts you can list them in this field separated by comma. For example: 12,20,22,21


Tag Cloud

Use Tag Cloud widget to display all available tags.


Poka Archives

Use the Poka Archives widget to display all the archives.
Title: The title of the widget.


Poka Categories

Use Poka Categories widget to display all the categories.
Title: The title of the widget.


Poka Legacy Text

Use Poka Legacy Text to display legacy text box widget.
Title: The title of the widget.
Text editor: The content of the widget.


Navigation Menu

Use this widget to display any registered navigation menu.
Title: The title of the widget.
Select Menu: You can select any registered navigation menu you want to display


Hooks/API

Filters

“poka_main_col_class_filter”
Use this filter to override the main content width, based on bootstrap grid.
You can find this filter in archive-affilitates.php, category.php, index.php, search.php, taxonomy-lists.php
Example Snippet:

add_filter( 'poka_main_col_class_filter', 'my_override_function' );
function my_override_function () {
  return 'col-md-10' ;
}

Note: If you do that you should also add a filter to poka_sidebar_col_class_filter in order to
prevent the grid from collapsing.


“poka_sidebar_col_class_filter”
Use this filter to override the sidebar width, based on the bootstrap grid.
You can find this filter in sidebar.php
Example Snippet:

add_filter( 'poka_sidebar_col_class_filter', 'my_override_function' );
function my_override_function () {
   return 'col-md-6' ;
}

“poka_post_widget_v1_query_args”
You can change the arguments of WP Query for the Poka Posts widget with this filter.


“poka_breadcrumbs_args”
Use this filter to override the breadcrumbs default arguments array.
You can find this filter in inc/addons/breadcrumbs.php
Example Snippet:

add_filter ( 'poka_breadcrumbs_args' , 'my_override_function' );
function my_override_function ($defaults) {
   $defaults['separator_icon'] = '|' ;
   return $defaults;
}

“poka_breadcrumbs_filter”
You can use this filter to alter the HTML of breadcrumbs or append something after the end of breadcrumbs output.
You can find this filter in inc/addons/breadcrumbs.php
Example Snippet:

add_filter ( 'poka_breadcrumbs_filter' , 'my_override_function' );
function my_override_function ($html) {
   $html .= '
Content After Breadcrumbs

‘ ; return $html; }


“poka_pagination_filter”
You can use this filter to alter the HTML of pagination or append something after the end of pagination’s output.
You can find this filter in inc/addons/pagination.php
Example Snippet:

add_filter ( 'poka_pagination_filter', 'my_override_function' );
function my_override_function ($html) {
   $html .= '
Content After Pagination

‘ ; return $html; }


“poka_affiliate_link_atts”
You can use this filter to add custom attributes to affiliate link buttons.
You can find this filter in inc/core/helpers-affiliates.php
Example Snippet:

add_filter ( 'poka_affiliate_link_atts', 'my_override_function' );
function my_override_function () {
   return 'rel="nofollow" ' ;
}

“poka_affiliate_link”
Use this filter to override the default structure of the affiliate’s link.
You can find this filter in inc/core/helpers-affiliates.php
Example Snippet:

add_filter ( 'poka_affiliate_link', 'my_override_function' );
function my_override_function ($link) {
   If ( '' !== $review_id ) {
      $link = 'pokatheme.com';
   } else {
      $link = '#';
   }
   return $link ;
}

“poka_review_single_button_html”
You can use this filter to alter the HTML of reviews’ links or append something after the end of reviews’ links.
You can find this filter in inc/core/helpers-affiliates.php
Example Snippet:

add_filter ( 'poka_review_single_button_html', 'my_override_function' );
function my_override_function ($link) {
   $link = "'This is a custom review link'";
   return $link;
}

“poka_affiliate_bonus_text”
You can use this filter to override the text of the affiliate’s bonus.
You can find this filter in inc/core/helpers-affiliates.php
Example Snippet:

add_filter ( 'poka_affiliate_bonus_text', 'my_override_function' );
function my_override_function () {   
   return "'
   This is my custom bonus text'" ;
}

“poka_affiliate_button_classes”
You can use this filter to override the classes of the affiliate’s button or add some more.
You can find this filter in inc/core/helpers-affiliates.php
Example Snippet:

   add_filter ( 'poka_affiliate_button_classes', 'my_override_function' );
function my_override_function ($classes) {   
   $classes = "'btn-big'"; 
   return $classes;
}

“poka_affiliate_button”
You can use this filter to alter the html structure of the affiliate’s button or append something after the end.
You can find this filter in inc/core/helpers-affiliates.php
Example Snippet:

add_filter ( 'poka_affiliate_button', 'my_override_function' );
function my_override_function ($btn) {   
   $btn = 'This is my custom Affiliate button' ;
   return $btn;
}

“poka_review_single_button_classes”
You can use this filter to alter the single review’s button classes or add some more.
You can find this filter in inc/core/helpers-affiliates.php
Example Snippet:

add_filter ( 'poka_review_single_button_classes', 'my_override_function' );
function my_override_function ($classes) {   
   $classes = 'btn-uppercase btn-red' ;
   return $classes;
}

“poka_review_single_button”
You can use this filter to alter the single review’s button html structure or append something in the end.
You can find this filter in inc/core/helpers-affiliates.php

add_filter ( 'poka_review_single_button', 'my_override_function' );
function my_override_function ($link) {   
   $link = "'
   This is my custom Single Review button'" ;
   return $link;
}

“poka_affiliate_tag”
You can use this filter to alter affiliate’s tag html structure or append something in the end.
You can find this filter in inc/core/helpers-affiliates.php

add_filter ( 'poka_affiliate_tag' , 'my_override_function' );
function my_override_function ($tag) {   
   $tag .= '
Content After Affiliate Tag
' ; return $tag; }

“poka_affiliate_rating_half_icon”
Use this filter to disable the default half star icon used in the theme.
You can find this filter in inc/core/helpers-affiliates.php
Example Snippet:

add_filter ( 'poka_affiliate_rating_half_icon', false );

“poka_affiliate_rating_html”
You can use this hook to alter the HTML of review rating or append something in the end.
You can find this filter in inc/core/helpers-affiliates.php
Example Snippet:

add_filter ( 'poka_affiliate_rating_html', 'my_override_function' );
function my_override_function ($html) {   
   $html .= '
   
Content After Review Rating
' ; return $html; }

“poka_affiliate_rating_icons”
Use this filter to override the rating icons default arguments array.
You can find this filter in inc/core/helpers-affiliates.php
Example Snippet:

add_filter ( 'poka_affiliate_rating_icons' , 'my_override_function' );
function my_override_function ($rating_icons) {
   $rating_icons[ 'full-star' ] = '' ;
   return $rating_icons;
}

“poka_custom_logo_width”
Use this filter to override the logo’s width.
You can find this filter in inc/core/setup-theme.php
Example Snippet:

add_filter ( 'poka_custom_logo_width', 'my_override_function' );
function my_override_function () {
   return 380;
}

“poka_custom_logo_height”
Use this filter to override the logo’s height.
You can find this filter in inc/core/setup-theme.php
Example Snippet:

add_filter ( 'poka_custom_logo_heigh', 'my_override_function' );
function my_override_function () {
   return 40;
}

“poka_static_version”
You can use this filter to override the version of static files used by poka in enqueue styles and
scripts.
For example when making changes the following example is useful in order all the static files to
get a different version in each page load.
You can find this filter in inc/core/setup-theme.php
You can find this filter in inc/gutenberg/gutenberg.php
Example Snippet:

add_filter ( 'poka_static_version' , 'my_override_function' );
function my_override_function () {
   return time() ;
}

“poka_default_css_vars”
Use this filter to override the css vars default arguments array.
You can find this filter in inc/customizer/customizer-functions.php
Example Snippet:

add_filter ( 'poka_default_css_vars' , 'my_override_function' );
function my_override_function ($defaults) {
   $defaults['fonts-base-font-size'] = '20' ;
   return $defaults;
}

“poka_print_css_vars”
You can use this filter to add or edit the print css vars.
You can find this filter in inc/customizer/customizer-functions.php
Example Snippet:

add_filter ( 'poka_print_css_vars' , 'my_override_function' );
function my_override_function ($defaults) {
 if ( get_theme_mod( 'colors-boxes-secondary-background-color' ) ) {   
 $output .= esc_attr( '--boxes-secondary-background-color:' . 
get_theme_mod( 'colors-boxes-secondary-background-color' ) . ';' ) . PHP_EOL;   
 } 
}

“poka_metabox_render_empty_groups”
You can use this filter to set if you want to render empty metaboxes.
You can find this filter in inc/metabox/group.php
Example Snippet:

add_filter ( 'poka_metabox_render_empty_groups' , 'my_override_function' );
function my_override_function () {
   return true;
}

“poka_metabox_register_group”
You can use this filter to register your own metaboxes.


“poka_metabox_prefix”
Use this filter if you want to change the prefix with which metaboxes are stored in the database.


“poka_affiliates_featured_default_atts”
You can use this filter to override the PokaTheme Featured Affiliates shortcode’s default arguments array.
You can find this filter in inc/shortcodes/affiliates-shortcodes.php
Example Snippet:

add_filter ( 'poka_affiliates_featured_default_atts' , 'my_override_function' );
function my_override_function ($default_atts) {
   $default_atts['featured_title'] = 'Top bookmakers';
   return $default_atts;
}

“poka_affiliates_featured_html_output”
You can use this filter to edit the HTML structure of the PokaTheme Featured Affiliates shortcode or append something in the end.
You can find this filter in inc/shortcodes/affiliates-shortcodes.php
Example Snippet:

add_filter ( 'poka_affiliates_featured_html_output' , 'my_override_function' );
function my_override_function ($html) {
   $html .= '
   
Content After PokaTheme Featured Affiliates
'; return $html; }

“poka_affiliates_search_default_atts”
You can use this filter to override the PokaTheme Affiliates Search shortcode’s default arguments array.
You can find this filter in inc/shortcodes/affiliates-shortcodes.php
Example Snippet:

add_filter ( 'poka_affiliates_search_default_atts' , 'my_override_function' );
function my_override_function ($default_atts) {
   $default_atts['placeholder'] = 'Search affiliates reviews ...';
   return $default_atts;
}

“poka_affiliates_search_html_output”
You can use this filter to edit the HTML structure of the PokaTheme Affiliates Search shortcode or append something in the end.
You can find this filter in inc/shortcodes/affiliates-shortcodes.php
Example Snippet:

add_filter ( 'poka_affiliates_search_html_output', 'my_override_function' );
function my_override_function ($html) {
   $html .= '
   
Content After Poka Theme Affiliates Search
'; return $html; }

“poka_affiliates_single_default_atts”
You can use this filter to override the PokaTheme Single Affiliate shortcode’s default arguments array.
You can find this filter in inc/shortcodes/affiliates-shortcodes.php
Example Snippet:

add_filter ( 'poka_affiliates_single_default_atts' , 'my_override_function' );
function my_override_function ($default_atts) {
   $default_atts['id'] = '45';
   return $default_atts;
}

“poka_affiliates_single_html_output”
You can use this filter to edit the HTML structure of the PokaTheme Single Affiliate shortcode or append something in the end.
You can find this filter in inc/shortcodes/affiliates-shortcodes.php
Example Snippet:

add_filter ( 'poka_affiliates_single_html_output'  'my_override_function' );
function my_override_function ($html) {
   $html .= '
   
Content After Poka Theme Single Affiliate
'; return $html; }

“poka_affiliates_table_default_atts”
You can use this filter to override the PokaTheme Affiliates Table shortcode’s default arguments array.
You can find this filter in inc/shortcodes/affiliates-shortcodes.php
Example Snippet:

add_filter ( 'poka_affiliates_table_default_atts' , 'my_override_function' );
function my_override_function ($default_atts) {
   $default_atts['num'] = '10';
   return $default_atts;
}

“poka_affiliates_table_html_output”
You can use this filter to edit the HTML structure of the PokaTheme Affiliates Table shortcode or append something in the end.
You can find this filter in inc/shortcodes/affiliates-shortcodes.php
Example Snippet:

add_filter ( 'poka_affiliates_table_html_output' , 'my_override_function' );
function my_override_function ($html) {
   $html .= '
   
Content After Poka Theme Affiliates Table
'; return $html; }

“poka_affiliates_list_default_atts”
You can use this filter to override the PokaTheme Affiliates List shortcode’s default arguments array.
You can find this filter in inc/shortcodes/affiliates-shortcodes.php
Example Snippet:

add_filter ( 'poka_affiliates_list_default_atts' , 'my_override_function' );
function my_override_function ($default_atts) {
   $default_atts['columns'] = '3';
   return $default_atts;
}

“poka_affiliates_list_html_output”
You can use this filter to edit the HTML structure of the PokaTheme Affiliates List shortcode or append something in the end.
You can find this filter in inc/shortcodes/affiliates-shortcodes.php
Example Snippet:

add_filter ( 'poka_affiliates_list_html_output', 'my_override_function' );
function my_override_function ($html) {
   $html .= '
   
Content After Poka Theme Affiliates List
'; return $html; }

“poka_posts_list_default_atts”
You can use this filter to override the PokaTheme Posts List shortcode’s default arguments array.
You can find this filter in inc/shortcodes/post-shortcodes.php
Example Snippet:

add_filter ( 'poka_posts_list_default_atts' , 'my_override_function' );
function my_override_function () {
   $default_atts['ajax_load_more'] = 'true';
   return $default_atts;
}

“poka_posts_list_html_output”
You can use this filter to edit the HTML structure of the PokaTheme Posts List shortcode or append something in the end.
You can find this filter in inc/shortcodes/post-shortcodes.php
Example Snippet:

add_filter ( 'poka_posts_list_html_output', 'my_override_function' );
function my_override_function ($html) {
   $html .= '
   
Content After Poka Theme Posts List
'; return $html; }

“poka_btn_default_atts”
You can use this filter to override the PokaTheme Button shortcode’s default arguments array.
You can find this filter in inc/shortcodes/various-shortcodes.php
Example Snippet:

add_filter ( 'poka_btn_default_atts', 'my_override_function' );
function my_override_function ($default_atts) {
   $default_atts['btn_size'] = 'small';
   return $default_atts;
}

“poka_btn_html_output”
You can use this filter to edit the HTML structure of the PokaTheme Button shortcode or append something in the end.
You can find this filter in inc/shortcodes/various-shortcodes.php
Example Snippet:

add_filter ('poka_btn_html_output', 'my_override_function' );
function my_override_function ($html) {
   $html .= '
   
Content After Poka Theme Button
'; return $html; }

“poka_box_text_default_atts”
You can use this filter to override the PokaTheme Box Text shortcode’s default arguments array.
You can find this filter in inc/shortcodes/various-shortcodes.php
Example Snippet:

add_filter ( 'poka_box_text_default_atts', 'my_override_function' );
function my_override_function ($default_atts) {
   $default_atts['title'] = 'Box Text Default Title;
   return $default_atts;
}

“poka_box_text_html_output”
You can use this filter to edit the HTML structure of the PokaTheme Box Text shortcode or append something in the end.
You can find this filter in inc/shortcodes/various-shortcodes.php
Example Snippet:

add_filter ('poka_box_text_html_output', 'my_override_function' );
function my_override_function ($html) {
   $html .= '
   
Content After Poka Theme Box Text
'; return $html; }

“poka_social_links_html_output”
You can use this filter to edit the HTML structure of the PokaThemes social links or append something in the end. Social links appear in header and footer.
You can find this filter in inc/shortcodes/various-shortcodes.php
Example Snippet:

add_filter ('poka_social_links_html_output', 'my_override_function' );
function my_override_function ($html) {
   $html .= '
   
Content After Poka Theme Social icons
'; return $html; }

“poka_carousel_default_atts”
You can use this filter to override the PokaTheme Carousel shortcode’s default arguments array.
You can find this filter in inc/shortcodes/various-shortcodes.php
Example Snippet:

add_filter ( 'poka_carousel_default_atts', 'my_override_function' );
function my_override_function ($default_atts) {
   $default_atts[style] = '1';
   $default_atts[type] = '2';
   return $default_atts;
}

“poka_featured_videos_atts”
You can use this filter to override the PokaTheme Featured Videos shortcode’s default arguments array.
You can find this filter in inc/shortcodes/video-shortcodes.php
Example Snippet:

add_filter ( 'poka_featured_videos_atts', 'my_override_function' );
function my_override_function ($default_atts) {
   $default_atts['cat'] = '125';
   $default_atts['ids'] = '2';
   return $default_atts;
}

“poka_featured_videos_html_output”
You can use this filter to edit the HTML structure of the PokaTheme Featured Videos or append something in the end. Social links appear in header and footer.
You can find this filter in inc/shortcodes/video-shortcodes.php
Example Snippet:

add_filter ('poka_featured_videos_html_output', 'my_override_function' );
function my_override_function ($html) {
   $html .= '"
   
Content After Poka Theme Featured Videos
"'; return $html; }

“poka_before_main”
You can use this to add custom HTML elements at the start of the document. Also you can remove attached elements in this action. (For example the breadcrumbs and banners)

Example Snippet:
add_action( 'poka_before_main', 'poka_before_content', 5, 0 );
function poka_before_content() {
   echo '
   

Custom Title

'; }

“poka_after_main”
Same as above, you can use this to add/remove blocks of code after the page main content.
Example Snippet:

add_action( 'poka_after_main', 'poka_after_content', 4, 0 );
function poka_after_content() {
   echo '
   

Custom Title

'; }

“poka_after_arhives”
You can use this to add custom HTML elements at the end specific documents.
You can find this filter in inc/templates/affiliates/affiliates-taxonomy.php
You can find this filter in inc/templates/posts/post-atchive-style1.php
You can find this filter in inc/templates/posts/post-atchive-style2.php

add_action( 'poka_after_arhives', 'poka_after_arhives', 5, 0 );
function poka_after_arhives() {
   echo '
   

Content after archives

'; }

Poka Geolocation

Overview

Poka Geolocation plugin provides IP geolocation detection tools and various shortcodes, functions, hooks and features.
This feature gives you the opportunity to select the allowed and disallowed countries for each affiliate. To make that happen first you must check the Enable Geolocation option in the review’s page and then set the allowed and disallowed countries. Poka Geolocation plugin will display the current country’s flag above the affiliate’s logo alongside with an check or x icon depending on the countries state.


Activation

Go to Customize > Theme Settings > General and check the “Enable Geolocation” option.


Installation

Poka Geolocation plugin uses Maxmind’s GEOLite2 Database which requires a license key. You can acquire one for free:

  • Go to GEOLite2 site and click sign up.
  • Once you’ve set up an account, login to your account portal and click “Manage License Keys” under Services.
  • Click “Generate new license key” and copy the new license key.
  • Go to the Poka Geolocation settings page and paste the license key.

Database

Poka Geolocation uses the MaxMind GEOLite2 Database. In order to keep the geo location detection accuracy as high as possible, this database needs to be updated frequently. You can update the database manually or let the plugin do it automatically for you.

Manual update

You can update the database manually through the admin settings page.

Automatic updates

You can enable automatic updates by checking the “Automatic Updates” option. You can also
choose the interval.
It is recommended to automatically update the database at least once weekly.


Cache


Geolocation cache will store the detected country until the session is over.
You can enable/disable or clear the cache from Poka Geolocation > Settings > Cache

Options


Add a country specific CSS class to the body
If set to true it will add 3 classes to the body element.
Example
geoloc-enabled
geoloc-country-code-gr
geoloc-country-name-greece
Load country flag icons CSS
If set to true it will load a css file with flag classes.
Example


Important! Disable this if you don’t need css classes for flag icons (improves page load time)


Notifications


Set the default attribute values for the [pokageo_notification] shortcode. Use {{country}} to display the user’s country name.


Shortcodes

Poka Geolocation offers a variety of shortcodes.
[pokageo_show codes=””]
Show content only for specific countries
Attributes
codes: Country ISO Codes separated by commas.
Example
[pokageo_show codes=”EN,GR”] lorem ipsum [/pokageo_show]


[pokageo_country]
Display detected country’s name.


[pokageo_notification flag=”” content=”” default=””]
Display a notification showing if the current post is available in the visitor’s country or not.
Attributes
flag : Whether it should display a flag icon or not (default: true)
content : The content for allowed countries.
default : The default content for disallowed countries.
Inside content and default text “{{country}}” will be automatically replaced by the visitor’s country name.
Example
[pokageo_notification flag=”false” content=”Users from {{country}} are accepted” default=”Users from {{country}} are not accepted”] [pokageo_disallowed_countries format=”” separator=”” list_class=”” list_item_class=”” codes=””] Get a list of all the disallowed countries for the current post in various formats.
Attributes
format : [string | list] The display format (default: string).
separator : String separator for countries. This is used when the format is string. (default: “, ”).
list_class : A custom css class for the ul element. This is used when the format is list.
list_item_class : A custom css class for the li elements. This is used when the format is list.
codes : By default the country names will be used. Set this true if you need the country ISO Codes instead. (default: false).
Example
[pokageo_disallowed_countries format=”list” list_class=”countries-list”]


[pokageo_hide codes=””]
Hide content for specific countries.
codes : Country ISO Codes separated by commas.
Example
[pokageo_hide codes=”EN,GR”] lorem ipsum [/pokageo_hide]


[pokageo_country_code]
Display detected country’s ISO Code.


[pokageo_allowed_countries format=”” separator=”” list_class=”” list_item_class=”” codes=””]
Get a list of all the allowed countries for the current post in various formats.
Attributes
format : [string | list] The display format (default: string).
separator : String separator for countries. This is used when the format is string. (default: “, ”).
list_class : A custom css class for the ul element. This is used when the format is list.
list_item_class : A custom css class for the li elements. This is used when the format is list.
codes : By default the country names will be used. Set this true if you need the country ISO Codes instead. (default: false).
Example
[pokageo_allowed_countries format=”list” list_class=”countries-list”]


[pokageo_all_countries format=”” separator=”” list_class=”” list_item_class=”” select_name=”” codes=””]
Get a list of all the allowed countries for the current post in various formats.
Attributes
format : [string | list | select] The display format (default: string).
separator : String separator for countries. This is used when the format is string. (default: “, ”).
list_class : A custom css class for the ul or select element. This is used when the format is list or select.
list_item_class : A custom css class for the li elements. This is used when the format is list.
select_name : The name attribute value for the select element. This is used when the format is select. (default: countries_list).
codes : By default the country names will be used. Set this true if you need the country ISO Codes instead. (default: false).
Example
[pokageo_all_countries format=”select” list_class=”countries-input”]


Functions

pokageo_detect_country_name()
Detects and returns the country name for current IP.


pokageo_get_country_flag_icon($country_code, $square)
Returns the SVG URL of a country flag by country ISO Code.
Attributes
$country_name : [string] The country ISO Code, e.g. EN (default: current visitor’s country)
$square : [bool] True for square flag icon, false for wide flag icon


pokageo_validate_ip($ip)
Checks if a string is a valid IPv4 or IPv6.
Attributes
$ip : [string] The IP.


pokageo_get_post_disallowed_countries($post_id)
Returns all the selected disallowed countries of a post.
Attributes
$post_id : [string] The post’s ID.


pokageo_is_country_allowed_for_post($post_id, $country_code)
Checks if a country is allowed for a specific post.
Attributes
$post_id : [string] The post’s ID.
$country_code : [string] The country ISO Code, e.g. EN (default: current visitor’s country)


pokageo_detect_country_code()
Detects and returns the country ISO Code for current IP.


pokageo_get_client_ip()
Returns the client’s IP.


pokageo_get_post_allowed_countries($post_id)
Returns all the selected allowed countries of a post.
Attributes
$post_id : [string] The post’s ID.


pokageo_get_all_countries()
Returns all the countries in an associative array with codes as keys and names as values.


pokageo_build_meta_query($post_type, $defaults)
Builds the meta query for WP_Query including only posts from allowed countries.
$post_type : [string] Query’s post type (default: ‘post’).
$defaults: [array] The meta query array. (default: empty array)


pokageo_get_post_types
Return all Poka Geolocation enabled post types.


Hooks

pokageo_query_args [filter]
Filters the WP_Query args and inserts the geolocation meta query. Use this if you need to query posts from allowed countries. If a meta query already exists, the geolocation meta query will be appended.
Important! Make sure $query_args contains post_type before you use apply_filters, otherwise post will be assumed.


pokageo_countries_map [filter]
Use this filter to remove or add additional countries to the internal Geomap Provider.


pokageo_post_types [filter]
Use this filter to remove or add additional post types and specify in which post types you want to use Poka Geolocation.


pokageo_loaded [action]
Fires when Poka Geolocation and all WordPress plugins are loaded.


pokageo_before_init [action]
Fires before Poka Geolocation initiazation.


pokageo_after_init [action]
Fires after Poka Geolocation initiazation.


Optional

Frontend CSS
You can disable the frontend css if you are going to add custom stylings on your theme’s CSS.
Less unused css usually means better pagespeed. Just include this filter inside your theme’s functions.php file:
add_filter(‘pokageo_load_css’, ‘__return_false’);


Translation
Poka Geolocation plugin uses WordPress official translations management system using PO/MO files and if you want to completely translate this plugin to a different language this is the way to go.


Templates
You can override some templates if you place the corresponding template file inside %themepath%/wp-content/pugins/poka-geolocation/templates/. This works for both parent and child themes. Some templates may have available data. You can access them through the $data object.
Below is a list of overridable templates:
notification.php
This template is used by the [pokageo_notification] shortcode.
Available Data
flag : [string: true/false] Whether it should display a flag icon or not (default: true)
content : The content for allowed countries.
default : The default content for disallowed countries.