Adding a leaderboard via PHP function

Note: This article relates to the free Leaderboard add-on.

You can add an affiliate leaderboard with a shortcode or widget but there may be times where you'd like finer control over the placement of the affiliate leaderboard. For this, you can write a function: