Last active
June 27, 2023 13:21
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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