Skip to content

Instantly share code, notes, and snippets.

@FriendlyWP
Last active February 10, 2021 21:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FriendlyWP/97ba1b24e3872592e4911c4f9c7be9d7 to your computer and use it in GitHub Desktop.
Save FriendlyWP/97ba1b24e3872592e4911c4f9c7be9d7 to your computer and use it in GitHub Desktop.
Accessible pager facet for FacetWP
add_filter( 'facetwp_facet_html', 'local_per_page', 10, 2);
function local_per_page ( $output, $params ) {
if ( 'pager' == $params['facet']['type'] ) {
$output = str_replace( 'class="facetwp-per-page-select"', 'class="facetwp-per-page-select" aria-label="Per Page Options"', $output );
}
return $output;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment