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.
Sometimes functions are easier to use in conditional statements if converted to variables.
ACF, PHP, WP/CP | Type: PHP
Enable compression in wp-config /* Compression */ define( 'COMPRESS_CSS', true ); define( 'COMPRESS_SCRIPTS', true ); define( 'ENFORCE_GZIP', true );
wp-config | Type: PHP
Conditional based on values for single-value fields (radio buttons, select, etc).
ACF, PHP | Type: PHP
The wpdb object can be used to access any database and query any table. Absolutely no need to be Wordpress related, which is very interesting. The benefit is the ability…
DB Query, WP/CP | Type: PHP
Reverse query from different post types associated via ACF relationship field.
ACF, CPT, WP Query | Type: PHP
This has to do with creating hierarchical CPTs, so you can have ‘sub-posts’ as children of a CPT single.
CPT, WP/CP | Type: PHP
CSS syntax and examples.
Animation, CSS3 | Type: CSS
Can hardly remember what it was like in the old days when we wanted rounded corners.
CSS3 | Type: CSS
View, experience and choose a cursor for your application.
CSS | Type: CSS