Skip to content

Instantly share code, notes, and snippets.

@jtsternberg
Last active May 5, 2016 15:10
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 jtsternberg/58dc0a1abe7df36bbc0ad5a1ff9f4faa to your computer and use it in GitHub Desktop.
Save jtsternberg/58dc0a1abe7df36bbc0ad5a1ff9f4faa to your computer and use it in GitHub Desktop.
Remove undesired strings from the google top content list output
<?php
/**
* Remove undesired items from the list output.
*/
function modify_gtc_list_output( $output ) {
$to_remove = array(
' » ',
' &raquo; ',
'» ',
'&raquo; ',
);
$output = str_replace( $to_remove, '', $output );
return $output;
}
add_filter( 'gtc_list_output', 'modify_gtc_list_output' );
add_filter( 'gtc_cached_list_output', 'modify_gtc_list_output' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment