Skip to content

Instantly share code, notes, and snippets.

@Glinkfr
Last active June 27, 2023 13:21
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 Glinkfr/855d03610237a9fccd19620d70ff3d24 to your computer and use it in GitHub Desktop.
Save Glinkfr/855d03610237a9fccd19620d70ff3d24 to your computer and use it in GitHub Desktop.
Snippet WordPress pour ajouter un attribut title à un lien dont on connait la classe CSS
function snippet_javascript() {
?>
<script type="text/javascript" id="seo-title-link">
jQuery(document).ready(function($) {
jQuery(".et-pb-arrow-prev").prop('title', 'Précédent');
jQuery(".et-pb-arrow-next").prop('title', 'Suivant');
});
</script>
<?php
}
add_action( 'wp_footer', 'snippet_javascript', PHP_INT_MAX );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment