(You can ignore those (yellow) warnings in console)
Step by Step
- Get id of button element
In this case it isnotes_link
. We can see there is no title attribute here. - Edit
hooks/header-extras.php
and insert the following code:Note: If theCode: Select all
<script> jQuery(function() { jQuery('#notes_link').attr("title", "My custom tooltip"); }); </script>
id
equalsnotes_link
, the selector in the jQuery call has to be#notes_link
. - Reload browser with clear cache (!)
- inspect button
- Check tooltip
If you want to change more than one, you can but don't have to repeat the whole script-block but you can do like this:
Code: Select all
<script>
jQuery(function() {
jQuery('#notes_link').attr("title", "My custom tooltip");
jQuery('#subscriptions_link').attr("title", "Another tooltip");
jQuery('#deliveries_link').attr("title", "Custom tooltip #3");
});
</script>