Create an ACF rule to restrict display of custom fields on the edit page based on whether or not the post has ancestors.
Continue reading “Create a custom location rule ‘Post Has Parent’ for WordPress Advanced Custom Fields”Add a universal page load bar and/or spinner to NextJS
Adding this is very easy when you make use of the NextJS router events and the NProgress package.
Continue reading “Add a universal page load bar and/or spinner to NextJS”Persist user state in NextJS by using a cookie and a context provider
Use a combination of application context and browser cookies to save and retrieve state in a NextJS app.
Continue reading “Persist user state in NextJS by using a cookie and a context provider”Change WordPress wp-admin ‘Visit site’ URL
When creating a headless or decoupled WordPress you may find that you want to change the Visit site link in the wp-admin bar to your chosen frontend.
Continue reading “Change WordPress wp-admin ‘Visit site’ URL”Change WordPress post preview URLs
When creating a headless or decoupled WordPress you may find that you want to display live previews on your chosen frontend.
Continue reading “Change WordPress post preview URLs”Create SSL certificate for localhost HTTPS using mkcert as trusted certificate authority
Install mkcert; Create local certificate authority; Create certificates for your localhost application.
Continue reading “Create SSL certificate for localhost HTTPS using mkcert as trusted certificate authority”Using Testify suite setup/teardown to run operations before/after groups of tests in Go
The standard testing library in go lacks setup and teardown features, Testify adds this feature (and many others).
Continue reading “Using Testify suite setup/teardown to run operations before/after groups of tests in Go”Enum type in Go
This ‘Season’ type can be used like any other type in go, but with limited allowed values.
Continue reading “Enum type in Go”Define a 404 fallback image in an Angular component
Try to load an image, but if it doesn’t exist instead load another image.
Continue reading “Define a 404 fallback image in an Angular component”How to create a responsive square image with CSS
Create a responsive square element containing an image using ::after pseudo class.
Continue reading “How to create a responsive square image with CSS”