Add attributes to WordPress Nav Menu Links (a tag)»
This can be very useful if you need to add attributes for a menu script. /** * Add custom attribute and value to a nav menu item's anchor based on…
Nav Menu, WP/CP | Type: PHP
Add Contextual Help for Custom Post Types»
The contextual help feature is a descending tab which can be seen in the top right of pages where available.
Custom Admin, Users, WP/CP | Type: PHP
Add Message on Thumbnail Metabox»
Sometimes you need to change the message.
Custom Admin, Users, WP/CP | Type: PHP
Add Theme Support for Title Tag»
It used to be that the way to add the Title Tag to WP sites was to add this in the theme’s header.php: <title><?php wp_title(); ?></title> Since WP4.1, use this…
Template Tags, WP/CP | Type: PHP
Adding an edit tag in PHP conditional»
Add [EDIT] in a PHP conditional, with style tags surrounding
PHP, WP/CP | Type: PHP
Adjust widget tag cloud font size range»
Sometimes the tag cloud sizes are too extreme. This fixes that.
WP/CP | Type: PHP
Anonymize IP in Google Analytics»
Set anonymizer after UA code: <!-- Google Analytics --> <script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-XXXXX-Y', 'auto'); ga('set', 'anonymizeIp', true); ga('send', 'pageview'); </script> <!-- End Google Analytics -->
Security, Sharing, WP/CP | Type: Javascript
Change WordPress Sender Email»
Less system-generated email will end up in spam folders if it's a legitimate email address.
WP/CP | Type: PHP
Child Theme Style Header»
Header info for child theme style sheet.
Child Theme, CSS, WP/CP | Type: CSS
Common WP functions converted to variables»
Sometimes functions are easier to use in conditional statements if converted to variables.
ACF, PHP, WP/CP | Type: PHP