Skip to content

Instantly share code, notes, and snippets.

@rilwis
Created September 6, 2023 08:30
Show Gist options
  • Save rilwis/5ff3b7c1eb8cc19716b8349ea8d58d3a to your computer and use it in GitHub Desktop.
Save rilwis/5ff3b7c1eb8cc19716b8349ea8d58d3a to your computer and use it in GitHub Desktop.
Slim SEO Schema: Remove hash in @id property
<?php
add_filter( 'slim_seo_schema_graph', function( $graph ) {
foreach( $graph as &$schema ) {
list( $url ) = explode( '#', $schema['@id'] );
$schema['@id'] = $url;
}
return $graph;
}, 20 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment