How to make changes to table list shortcode – PokaTheme https://pokatheme.com/topic/how-to-make-changes-to-table-list-shortcode/feed/ Fri, 19 Jan 2024 03:26:01 +0000 https://bbpress.org/?v=2.6.9 en-US https://pokatheme.com/topic/how-to-make-changes-to-table-list-shortcode/#post-4434 <![CDATA[How to make changes to table list shortcode]]> https://pokatheme.com/topic/how-to-make-changes-to-table-list-shortcode/#post-4434 Fri, 31 May 2019 13:48:45 +0000 admin 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 .=   ‘ ID).”>'. get_the_title() .'‘;`With 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”

 

]]>