🎯 Need Help?

Get Premium Support

Priority assistance from the developer

⬆️ Upgrade

Unlock all features

More from ANWP

AnWP Club Kit

7 ready-made club site designs for Football Leagues

Learn more β†’

Sports API Hub

Live sports data integration for WordPress

Learn more β†’

Tennis API Hub

Live tennis and table tennis data for WordPress

Learn more β†’

Sports Leagues Premium

Multi-sport league management with advanced statistics

Learn more β†’

Styling Hooks


Since 0.19.0, Football Leagues prints a second set of CSS classes on its blocks and on the elements inside them. They all start with fls- (FL Style): fls-standing, fls-team-name, fls-score. They’re there for one reason – so your CSS has something to hold on to that won’t move when we change a template. This page lists every one of them and shows how to use them in Additional CSS, a child theme or an add-on.

The hooks are in the free plugin. The PRO Style Editor is a point-and-click editor built on the same classes, and free sites get them as the class list in SiteOrigin CSS’s Football Leagues Mode.

The promise

An fls- class is never renamed or removed. If the markup changes, the class moves to the matching new element. The plugin’s other classes – standing-table__club, anwp-fl-lb__record-row and the rest – are internal and can change in any release. Write new CSS against fls- classes wherever one exists.

πŸš€ Three kinds of class

ClassWhere it isUse it for
fls-blockThe outer wrapper of every blockEvery block at once: .fls-block { border-radius: 12px; }
fls-{block}The same wrapper, naming the block type: fls-standing, fls-match-slim, fls-player-headerOne block type, and scoping an element to it
fls-{element}An element inside a block: fls-team-name, fls-score, fls-rowThe element. Names are shared, so fls-team-name is the team name in a standing, a match list and a header alike

On a standing table it looks like this. The fls- classes sit next to the plugin’s own classes, which are still there and still styled as before:

<div class="standing standing--shortcode ... fls-block fls-standing">
  <div class="standing-table__rank ... fls-rank">1</div>
  <a class="club__link fls-team-name ...">Arsenal</a>
  <div class="standing-table__cell-number standing-table__points fls-points ...">54</div>

A few rules hold for every class on this page:

  • Football Leagues never styles them. The plugin’s own stylesheets don’t contain a single .fls- selector. Adding the classes changed nothing on your site, and a plugin update can’t fight a rule you write against them.
  • One element class per element. An element is a team name or a score, never both.
  • No state classes. There’s no fls-live, fls-win or fls-active. LIVE colours, win / draw / loss colours, promotion zones and the selected tab come from Settings & Tools > Settings > Appearance, so a rule on fls-form-item or fls-tab should leave colours alone or it paints every state the same.

🎯 Writing a rule

Put the CSS where you’d put any custom CSS – CSS Recipes covers Additional CSS on classic and block themes. Then scope the element to its block type:

/* Team names in standing tables only */
.fls-standing .fls-team-name {
	font-weight: 700;
}

/* Team names everywhere: tables, match lists, headers */
.fls-team-name {
	text-transform: uppercase;
}

/* Every Football Leagues block */
.fls-block {
	border-radius: 12px;
}

Prefer the two-class form. The plugin and your theme often style an element with a selector longer than one class. A one-class rule like .fls-team-name works for anything they leave alone – text-transform here – but can lose on a property they already set. Scoped with the block class it has two classes, which beats most of them, and Additional CSS wins a tie because it prints later.

One block, not the whole type. In Layout Builder (PRO), open the block’s settings, go to the Advanced tab and add your own name under CSS Classes, say home-table. Then .home-table .fls-team-name styles that block only.

Over a Style Editor style (PRO). Style Editor rules are written with an extra wrapper class so they beat the plugin and the theme, and you can still beat them: click the element in the Style Editor, copy the selector it shows under CSS selector, and paste that into Additional CSS. Same strength, later in the page – your rule wins.

Element classes

Scope is how the Style Editor offers the element. “Block type” elements are styled inside one block type at a time (every row on a site is never what anyone means). “Block type or everywhere” elements can also be styled site-wide in one rule. In your own CSS you can of course write either.

ClassElementKindScopeGroup
fls-titleTitleTextBlock type or everywhereBlock chrome
fls-subtitleSubtitleTextBlock type or everywhereBlock chrome
fls-headerHeaderBoxBlock type or everywhereBlock chrome
fls-tabsTabsBoxBlock type or everywhereBlock chrome
fls-tabTabControlBlock type or everywhereBlock chrome
fls-pillPillControlBlock type or everywhereBlock chrome
fls-buttonButtonControlBlock type or everywhereBlock chrome
fls-emptyEmpty MessageTextBlock type or everywhereBlock chrome
fls-rowRowBoxBlock typeTables and lists
fls-table-headTable HeadBoxBlock typeTables and lists
fls-rankRankTextBlock typeTables and lists
fls-cellCellTextBlock typeTables and lists
fls-pointsPointsTextBlock typeTables and lists
fls-form-guideForm GuideBoxBlock typeTables and lists
fls-form-itemForm ItemChipBlock typeTables and lists
fls-notesNotesTextBlock typeTables and lists
fls-cardCardBoxBlock typeTables and lists
fls-team-nameTeam NameTextBlock type or everywhereTeams, players, competitions
fls-team-logoTeam LogoImageBlock type or everywhereTeams, players, competitions
fls-player-namePlayer NameTextBlock type or everywhereTeams, players, competitions
fls-player-photoPlayer PhotoImageBlock type or everywhereTeams, players, competitions
fls-competition-nameCompetition NameTextBlock type or everywhereTeams, players, competitions
fls-competition-logoCompetition LogoImageBlock type or everywhereTeams, players, competitions
fls-scoreScoreTextBlock type or everywhereGames
fls-dateDateTextBlock type or everywhereGames
fls-timeTimeTextBlock type or everywhereGames
fls-venueVenueTextBlock type or everywhereGames
fls-refereeRefereeTextBlock type or everywhereGames
fls-statusStatusTextBlock typeGames
fls-roundRoundTextBlock typeGames
fls-xgxGTextBlock typeGames
fls-scorersScorersBoxBlock typeGames
fls-labelLabelTextBlock typeStats
fls-valueValueTextBlock typeStats
fls-barBarBarBlock typeStats
fls-socialSocialBoxBlock typeOther

The kind decides what the Style Editor lets you change:

KindStyle Editor controls
BoxBackground, padding, margin, border, radius, hide
TextColour, font size, weight, transform, hide
ImageSize, radius, border, hide
Bar, ChipBackground, radius, hide. Win / draw / loss colours stay with the Appearance settings
ControlFont size, weight, transform, padding, radius, hide – no colours, so the selected tab or pill stays visible

Block classes

Every block root carries fls-block plus one of these. The header classes are shared on purpose: the classic player header and the Layout Builder Player Header block are both fls-player-header, and the classic match header, the PRO scoreboard and the Layout Builder Game Header are all fls-game-header. A rule written for one keeps working when you move a page to Layout Builder.

ClassBlock
fls-blockBlock
fls-standingStanding
fls-match-slimMatch – Slim
fls-player-headerPlayer Header
fls-team-headerTeam Header
fls-game-headerGame Header
fls-player-matchesPlayer Matches

Layout Builder blocks (PRO)

Every Layout Builder block type has its own class, made from its internal name with _ turned into -. Those names are stored in your saved layouts, so they never change either.

ClassLayout Builder block
fls-competition-bottom-contentCompetition Bottom Content
fls-competition-bracketCompetition Bracket
fls-competition-club-statsCompetition Club Stats
fls-competition-fixturesCompetition Fixtures
fls-competition-stats-overviewCompetition Goals & Results Breakdown
fls-competition-headerCompetition Header
fls-competition-matchesCompetition Matches
fls-competition-matches-compactCompetition Matches – Compact
fls-competition-matchweek-slidesCompetition Matchweek Slides
fls-competition-player-statsCompetition Player Statistics
fls-competition-resultsCompetition Results
fls-competition-results-matrixCompetition Results Matrix
fls-competition-scorelinesCompetition Scorelines & Goals
fls-competition-leadersCompetition Season Leaders
fls-competition-standingsCompetition Standings
fls-competition-transfersCompetition Transfers
fls-game-away-club-headerGame Away Club Header
fls-game-booking-riskGame Booking Risk
fls-game-bottom-contentGame Bottom Content
fls-game-commentaryGame Commentary
fls-game-common-opponentsGame Common Opponents
fls-game-events-summaryGame Events Summary
fls-game-form-ppgGame Form & Points per Game
fls-game-galleryGame Gallery
fls-game-goals-for-againstGame Goals Scored & Conceded
fls-game-goal-timingGame Goal Timing
fls-game-halvesGame Halves & Game State
fls-game-h2h-recordGame Head to Head
fls-game-home-club-headerGame Home Club Header
fls-game-latestGame Latest Games
fls-game-likely-scorersGame Likely Scorers
fls-game-lineupsGame Lineups
fls-game-live-statsGame Live Stats
fls-game-goals-ouGame Match Goals
fls-game-match-totalsGame Match Totals
fls-game-missing-playersGame Missing Players
fls-game-live-momentumGame Momentum
fls-game-player-statsGame Player Stats
fls-game-prediction-apiGame Prediction (API)
fls-game-refereesGame Referees
fls-game-schedule-contextGame Rest & Schedule
fls-game-result-contextGame Result in Context
fls-game-standingsGame Standings
fls-game-prediction-statsGame Stats Prediction
fls-game-streaksGame Streaks
fls-game-summaryGame Summary
fls-game-team-comparisonGame Team Comparison
fls-game-statsGame Team Stats
fls-game-timelineGame Timeline
fls-game-top-performersGame Top Performers
fls-game-videoGame Video
fls-game-xg-summaryGame xG & Finishing
fls-global-htmlHTML Block
fls-player-bottom-contentPlayer Bottom Content
fls-player-careerPlayer Career
fls-player-career-chartPlayer Career Chart
fls-player-club-standingsPlayer Club Standings
fls-player-descriptionPlayer Description
fls-player-disciplinePlayer Discipline
fls-player-form-trendsPlayer Form Trends
fls-player-galleryPlayer Gallery
fls-player-game-logPlayer Game Log
fls-player-goal-analysisPlayer Goal Analysis
fls-player-missedPlayer Missed Matches
fls-player-next-gamePlayer Next Game
fls-player-season-recordPlayer Season Record
fls-player-statsPlayer Season Statistics
fls-player-splitsPlayer Splits
fls-player-stats-panelPlayer Stats Panel
fls-player-teammatesPlayer Teammates
fls-player-top-performancesPlayer Top Performances
fls-player-transfersPlayer Transfers
fls-player-vs-opponentsPlayer vs Opponents
fls-global-shortcodeShortcode Block
fls-team-subteam-squadTeam Combined Squad
fls-team-descriptionTeam Description
fls-team-fixturesTeam Fixtures
fls-team-form-trendsTeam Form Trends
fls-team-galleryTeam Gallery
fls-team-match-breakdownTeam Match & Goals Breakdown
fls-team-player-statsTeam Player Stats
fls-team-rankingsTeam Rankings
fls-team-resultsTeam Results
fls-team-rosterTeam Roster
fls-team-scheduleTeam Schedule
fls-team-scorelinesTeam Scorelines & Goals
fls-team-season-recordTeam Season Record
fls-team-season-statsTeam Season Statistics
fls-team-squadTeam Squad
fls-team-standingsTeam Standings
fls-team-subteam-scheduleTeam Subteam Schedule
fls-team-subteam-statsTeam Subteam Statistics
fls-team-leaderboardsTeam Top Players
fls-team-trophiesTeam Trophies
fls-global-textText Block

Where the hooks are printed

  • Classic pages and shortcodes: standing tables (all layouts), match lists, the match header and PRO scoreboard, the club header and the player header. Other classic sections – lineups, stats tables and so on – have no hooks yet.
  • Layout Builder (PRO): every block, its title, header, tabs, pills and empty-state text, and the elements inside almost every block. A few blocks print another shortcode inside them and have hooks on the block and its title only: Team Squad, Team Player Stats, Team Season Statistics (the stats table), Team Form Trends, Competition Header, Competition Player Statistics, Competition Bracket, Competition Results Matrix, Competition Matchweek Slides and Competition Transfers.
  • Template overrides in your theme copied before 0.19.0 don’t print the classes, because the copy is older than the hooks. Copy the template again, or add the classes to your copy by hand. (The Style Editor still reaches most of that markup: its rules for classic elements also match the old plugin class.)

Register your own hooks (add-ons)

An add-on or kit that prints its own markup can put fls- classes on it and register them, so the Style Editor can pick and style them like the plugin’s own. Use the anwpfl/style_hooks/parts filter. Entries are keyed by the name without the prefix:

add_filter( 'anwpfl/style_hooks/parts', function ( $parts ) {

	// Block root: print class="fls-block fls-my-fixtures" on the wrapper.
	$parts['my-fixtures'] = [
		'role'  => 'block',
		'kind'  => 'box',
		'label' => 'My Fixtures',
		'group' => 'blocks',
	];

	// Element: print class="fls-sponsor" on the element.
	$parts['sponsor'] = [
		'role'  => 'element',
		'kind'  => 'text',
		'label' => 'Sponsor',
		'group' => 'other',
	];

	return $parts;
} );
KeyRequiredValue
roleyesblock (a block root) or element
kindyesbox, text, image, bar, chip or control – see the kinds table above
labelnoThe name shown in the Style Editor. Defaults to the key
groupnoA group slug, such as blocks, chrome, table, match, stats, other
globalnotrue lets an element be styled “everywhere”, not only inside one block type
fallbacknoAn older selector for the same element, for markup that doesn’t have the class yet. Class and tag names joined by a space, > or , only
retirednotrue when the element no longer exists. Saved styles are kept but print nothing
  • Names are lowercase words joined by single dashes (my-fixtures, not my_fixtures or myFixtures). Built-in names can’t be replaced, and an entry that fails any check is dropped without an error.
  • Once a name is out, keep it. Customers’ saved styles point at the name. If your add-on drops the markup, mark the entry retired instead of deleting it.
  • Switching your add-on off doesn’t delete styles. The Style Editor keeps rules for names that aren’t registered right now and prints nothing for them until the add-on is back.

πŸ“š Related

  • Style Editor (PRO) – click an element on your site and style it, built on these classes.
  • CSS Recipes – where to put custom CSS, and tested snippets.
  • Hooks – PHP filters and actions.