How can we help?

If you are looking for support for our PokaTheme, this is the place!

Home Forums FAQ How to make changes to table list shortcode

This topic contains 0 replies, has 1 voice, and was last updated by  admin 4 months, 3 weeks ago.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #4434

    admin
    Keymaster

    If you want to make changes to [table_list] shortcode or to any other shortcode you can follow the steps below:

    If you are not already using Poka child theme first upload it to your themes folder and then activate it so every change you need to make to be in your child theme in order to update Poka theme in future versions.

    In your child theme you’ll find the following files:

    • Functions.php – (this is where we add our shortcode)
    • Style.css – (this is where we add our additional styles)

     

    The first step is to override the function of the shortcode to your child theme.

    You have to override the function of [table_list] shortcode to your functions.php

    Go to the parent theme to the folder : inc/addons/sc-table-list.php and copy everything that is inside :

    if( ! function_exists( 'tablelist' ) ){ }

    After that go to your child theme functions.php and paste it to the end of the file.

    Now that we can safely edit this shortcode we will go through some changes we can make.

    • Change color of the number
        1. With the following rule added to your style.css you can make any styling changes you want to the number of the table .
          1. For example: .table-s1 .item .count { background:#000; }
    • Change the color of the background box around the logo
        1. You can add the following CSS rule to your style.css.
          1. For example: .table-s1.table-big .item .c2 a { background:#000; }
    • Make the URL of the logo an affiliate URL
        1. You can replace the following line of the shortcode:
          1. $html .=   ‘ <a href=”‘.get_permalink().'”><img src=”‘.$thumb[0].'” alt=”‘. get_the_title() .'” /></a>’;
            1. $html .=   ' <a href="'.get_site_url().'/'.$folder.'/'.get_field('affiliate_key',get_field('affiliate_link')->ID)."><img src="'.$thumb[0].'" alt="'. get_the_title() .'" /></a>'; the following:
    • Change the color of the stars
        1. You can add the following CSS rule to your stylesheet:
          1. .rating i { background:#ccc; }
    • Change the color of the bonus text
        1. You can add the following CSS rule to your stylesheet:
          1. .table-s1 .item .c4 h4 { color:#444; }
    • Change the color or the text of the affiliate button
      1. You can change the color of the affiliate button from Visual Settings -> “Green Color”
      2. Also you can change the text of the button from Theme Settings -> Translations -> “Play now button text”

     

Viewing 1 post (of 1 total)

The forum ‘FAQ’ is closed to new topics and replies.