🎯 Need Help?

Get Premium Support

Priority assistance from the developer

⬆️ Upgrade

Unlock all features

More from ANWP

Sports Leagues Premium

Multi-sport league management with advanced statistics

Learn more β†’

AnWP SL Theme Kit

Starter themes & block patterns for Sports Leagues

Learn more β†’

Club Form Trends

Pro Feature

[anwpfl-club-form-trends] shows a club’s last few games as a grid. Each column is one game, oldest on the left and newest on the right. Each row is a trend – the result, whether the club scored, kept a clean sheet, saw over 2.5 goals – and the count at the end of the row says how often it happened.

It’s the form guide for a match preview or a betting-style club page: the pattern at a glance, the numbers on the right.

The club form trends grid - a Result row of green, amber and red W, D and L badges over ten games, five rows of green dots and grey rings below it, and a count such as 7/10 at the end of each row

Premium Feature

This shortcode requires the Football Leagues Premium plugin.

πŸš€ Basic usage

[anwpfl-club-form-trends club_id="45"]

That’s all it needs. You get the club’s last 10 finished games across every competition, with six rows: Result, Scored, Clean sheet, Conceded 2+, Over 2.5 and Both teams scored.

To build one with a live preview, go to Football Leagues > Shortcodes and pick Club Form Trends. Leave Rows empty for the same six rows, or pick the ones you want and drag them into order.

On versions before FL+ 0.18.4, a shortcode copied from the builder with Rows left empty shows all 14 rows – pick your rows there, or update.

The Club Form Trends shortcode builder with the Club selector, a Query section holding Competition ID, Venue and Limit, and a Display section holding Rows and Header

Reading the grid

You seeIt means
Green W, amber D, red L badgeThe result of that game. Hover a badge for a small game card with both clubs and the score.
Green dotYes – the trend happened in that game
Grey ringNo – it didn’t
A dashNo data – only on the half-time rows, for a game with no half-time score
7/10 at the end of a rowIt happened in 7 of the 10 games that have data for that row

The Result row has no count, and a thin line separates it from the rows below. If your site calls them something other than W, D and L, change the letters at Settings & Tools > Settings > Content > Text & Labels > Outcome Letters.

The grid works in narrow spaces too. When it doesn’t fit, it scrolls sideways with the row names pinned on the left and the counts pinned on the right, and in containers under 480px the dots and columns shrink.

Which games count

Only finished, official games. Friendlies and fixtures are never included. The shortcode takes the newest ones by kickoff – 10 unless you set limit – and lays them out oldest first.

There’s no season option. The window is always “the last N games”, so early in a season it reaches back into the previous one. To keep it to one season, set competition_id: competitions are per season, so the grid then only uses that competition’s games.

Extra time and penalties

The Result row reads the final score, extra time included. Every goal-based row reads the 90-minute score instead. So a cup game that was 2-2 after 90 minutes and finished 4-2 after extra time is a W, but counts as 2-2 for Clean sheet, Over 2.5, Scored 2+ and the rest.

Penalty shootout goals aren’t part of the score, so a tie decided on penalties shows as a D whoever won the shootout.

Rows

Fourteen rows are available. Pass their IDs in rows, comma-separated, and they show in the order you list them. “For” is the club’s goals, “against” is the opponent’s.

IDLabelGreen dot whenDefault
outcomeResultShows the W, D or L badge instead of a dotYes
scoredScored1 or more goals forYes
failed_to_scoreFailed to score0 goals for
clean_sheetClean sheet0 goals againstYes
concededConceded1 or more goals against
conceded_2plusConceded 2+2 or more goals againstYes
scored_2plusScored 2+2 or more goals for
over_1_5Over 1.52 or more goals in the game
over_2_5Over 2.53 or more goals in the gameYes
over_3_5Over 3.54 or more goals in the game
bttsBoth teams scoredBoth clubs scored at least onceYes
won_to_nilWon to nilWon and conceded nothing
leading_htLeading at HTAhead at half-time
comebackComebackBehind at half-time and didn’t lose

The two half-time rows need half-time scores. Games without one get a dash and are left out of that row’s count. If none of the games in the grid has a half-time score, the row is hidden rather than showing 0.

Parameters

ParameterDefaultDescription
club_id *(required)The club. Without it nothing is printed.
competition_id(all)Only games from this competition. Pass the main competition and its stages are included too, such as the group stage and knockout rounds of a multistage cup. A stage ID narrows it to that stage only.
venueallhome for the club’s home games, away for away games
limit10How many games. The builder offers 5, 10 and 15, but any number from 1 to 50 works when typed by hand.
rowsthe six marked Default aboveRow IDs, comma-separated, in display order. Empty uses the default six.
header(empty)A heading above the grid
class(empty)An extra CSS class on the wrapper. Not in the builder – add it by hand.

* Required parameter

Examples

Home form in the league, with half-time rows

[anwpfl-club-form-trends club_id="45" competition_id="12" venue="home" limit="5" rows="outcome,btts,leading_ht,comeback,clean_sheet" header="Home form"]

The last 5 home league games, with a heading and the rows in exactly this order.

A form trends grid with a heading above it and five game columns, showing the Result row followed by Both teams scored, Leading at HT, Comeback and Clean sheet

Goals-heavy view over 15 games

[anwpfl-club-form-trends club_id="45" limit="15" rows="outcome,scored_2plus,over_3_5,won_to_nil"]

Fifteen games across all competitions, with the rows a goals market would care about.

On a club page in the Layout Builder

[anwpfl-club-form-trends club_id="%club_id%" venue="away" header="Away form"]

Put this in a Shortcode block in a team or club layout and %club_id% becomes the ID of whichever club page is open. It’s how you show a second, away-only grid next to the built-in Form Trends block.

The same grid elsewhere

The grid also appears in two other places. Both draw the same rows with the same rules, but they don’t behave exactly like the shortcode.

The Form Trends block in a Layout Builder v2 team layout

  • It adds pills above the grid: one row of competitions (with All) and one of venues (Home & Away, Home, Away), so visitors can switch without a page reload.
  • It can open on one competition instead of All. Its Default Competition setting picks the club’s highest-priority competition type, and in the default team layout that’s the league. This is the usual reason a club page and a shortcode show different games – the shortcode starts from all competitions.
  • Its Items to Show setting goes from 1 to 20, and its Metric Rows checkboxes always show rows in the order of the table above, not the order you ticked them. None ticked means the default six.

More on the v2 team page: Team Layout (v2).

The Form Trends section of the Club shortcode

[anwpfl-club club_id="45" sections="form-trends"]

A fixed version with no pills and nothing to set: all competitions, home and away, 10 games, the default six rows. Use [anwpfl-club-form-trends] when you need any of the options above.

Not the same thing: the Form Trends block in a v2 player layout is a bar chart of a player’s rating, goals and assists, and the form dots in the v2 Team Header are a plain last-results strip.

πŸ†˜ Troubleshooting

Nothing renders at all

The shortcode prints nothing – no message, no heading – when it has no games to show. Check:

  1. club_id is set and is a real club.
  2. The club has finished, official games. Friendlies don’t count, and neither do games still marked as fixtures.
  3. The filters leave something. A competition_id the club didn’t play in, or venue="away" in a competition with no away games yet, leaves the grid empty.

All 14 rows appear

Every ID in rows is misspelt. Unknown IDs are dropped, and when none are left the grid falls back to all 14 rows. Copy the IDs from the Rows table above, or pick them in the builder.

A half-time row is missing

None of the games in the grid has a half-time score, so Leading at HT and Comeback hide themselves. Add half-time scores to those games, or leave the rows out.

A count reads 6/8 when the grid has 10 games

That row has data for only 8 of them. It happens on the half-time rows when some games lack a half-time score – the dash cells aren’t counted.

The club page shows different games from my shortcode

The v2 Form Trends block opens on the club’s league, while the shortcode uses all competitions. Click All in the block’s competition pills to compare like with like, or set competition_id on the shortcode.

πŸ“š Related