Skip to content

Instantly share code, notes, and snippets.

@Glinkfr
Last active June 27, 2023 13:21
Show Gist options
  • Save Glinkfr/5a2db6f3632c52607c64bda4bcd8d298 to your computer and use it in GitHub Desktop.
Save Glinkfr/5a2db6f3632c52607c64bda4bcd8d298 to your computer and use it in GitHub Desktop.
Snippet WordPress supprimer l'attribut rel à un lien dont on connait la classe CSS
function snippet_remove_rel() {
?>
<script type="text/javascript" id="seo-title-link">
jQuery(document).ready(function($) {
var $this = $(this);
var $items = $this.find('a.la_classe_css');
$items.removeAttr('rel');
});
</script>
<?php
}
add_action( 'wp_footer', 'snippet_remove_rel', PHP_INT_MAX );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment