League Table Shortcode

Below, you’ll find a detailed guide on how to add the League Table Shortcode to your WordPress website, including its parameters, examples, and PHP function code. Additionally, we’ll assist you with common issues that might cause the League Table Plugin shortcode not to show or not to work correctly.

Before starting, here is an overview of the League Table Plugin and the shortcodes it provides:

Plugin Icon
League Table

"League Table is a versatile WordPress plugin that allows you to create responsive, sortable, and customizable tables, perfect for sports leagues, statistics, and comparative data."

✩✩✩✩✩ () Active Installs: 2000+ Tested with: 6.2.3 PHP Version: 7.2
Included Shortcodes:
  • []

League Table [null] Shortcode

The League Table Lite shortcode is used to display a league table on a WordPress page or post. The shortcode is: [ltl]. It fetches a specified league table from the database and displays it. The table ID is passed as an attribute to the shortcode. If the table doesn’t exist or the ID is not provided, an error message is displayed. The shortcode also handles table properties like cell properties, column width, and manual sorting. It can also add images or links to cells.

Shortcode: [null]

Parameters

Here is a list of all possible null shortcode parameters and attributes:

  • id – Unique identifier of the league table

Examples and Usage

Basic example – Display a league table by referencing its ID.

[ltl id=1 /]

Advanced examples

Display a league table by referencing its ID. If the table is not found by ID, it will display a message asking to enter the identifier of the table.

[ltl id=2 /]

Display a league table by referencing its ID. If the table is not found by ID or if the same shortcode is used multiple times, it will display a message stating that the same shortcode cannot be used multiple times.

[ltl id=3 /]

PHP Function Code

In case you have difficulties debugging what causing issues with [null] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode('ltl', array($this, 'display_league_table'));

Shortcode PHP function:

Code file location:

league-table-lite/league-table-lite/public/class-daextletal-public.php

Conclusion

Now that you’ve learned how to embed the League Table Plugin shortcode, understood the parameters, and seen code examples, it’s easy to use and debug any issue that might cause it to ‘not work’. If you still have difficulties with it, don’t hesitate to leave a comment below.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *