Via theme.json or via php
Continue reading “Methods to define a custom template in WordPress for any post type”Add an option to hide the label for fields in WordPress Advanced Custom Fields
Simply add a hide label option to all fields created with ACF.
Continue reading “Add an option to hide the label for fields in WordPress Advanced Custom Fields”Display copyright ‘current year’ in the footer using WordPress full site editing blocks
Responsive masonry in React with a straight bottom line
CSS Grid to assign columns, with a little JavaScript to stretch the last item in each column.
Continue reading “Responsive masonry in React with a straight bottom line”Create a custom location rule ‘Post Has Parent’ for WordPress Advanced Custom Fields
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”