A collection of (mostly) WordPress-related snippets and references I’ve found useful and worth keeping where I can find them. Feel free to use what you like, and point me to some better snippets or references.
Prepopulate Gravity Forms with User Info»
Pre-populate form fields with info from user profile for registered, logged in users.
Forms | Type: Other
Pseudo Classes»
Some very handy classes and selectors to know.
CSS | Type: CSS
Pure CSS triangle»
Creates a triangle shape with nothing but CSS. Note that the border placement and color dictates triangle color and direction of pointer (opposite the visible border).
CSS | Type: CSS
Query Posts with ACF Values (Basic)»
Displaying posts that include a particular value for an ACF field (meta_key).
ACF | Type: PHP
RankMath Functions»
Move RankMath metabox to bottom of the edit screen //change the metabox display location to bottom function rank_math_change_metabox_priority() { return 'low'; } add_filter( 'rank_math/metabox/priority', 'rank_math_change_metabox_priority' ); Remove node from admin…
PHP, WP/CP | Type: PHP
RBGA Backgrounds and Shadows»
Provides more flexibility and animation potential.
CSS3 | Type: CSS
Read More/Less Toggle»
Not as easy to find as I'd have guessed. Initially shows a defined number of characters (appended with ellipses) and a 'read more' link.
jQuery | Type: Javascript
Redirect Users on Login Based on Role»
This plugin allows redirection of users when they login, based on role.
Custom Admin, Users | Type: PHP
Register Custom Post Types and Taxonomies»
Example shows how to register a CPT and taxonomies.
CPT, Taxonomy | Type: PHP
Remove ‘Add New Form’ from +New Menu»
When you don't want to give users the ability to add a new form from the admin menu.
Custom Admin, Forms | Type: PHP