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.
Random order with ACF Repeater field»
Repeatable fields can be stored in an array using PHP, and using the PHP shuffle() function, we can shuffle the array elements.
ACF, PHP | 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
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
Remove GF ‘Add New Form’»
Remove 'Add NewForm' from admin bar.
Forms | Type: PHP
Remove Items from WP/CP Admin Bar»
// Remove items from the admin bar function remove_from_admin_bar($wp_admin_bar) { /* * Placing items in here will only remove them from admin bar * when viewing the fronte end of…
PHP, WP/CP | Type: PHP
Remove Metabox from Template»
When you need a particular metabox to disappear from a particular template.
Javascript, WP/CP | Type: Javascript
Remove Personal Options Section from User Profile»
Removes the 'profile.php' admin color scheme options.
Users, WP/CP | Type: PHP