I have a uses page where I detail my hardware and software setups, including this site. I’m fairly confident, one day, someone besides myself will appreciate this. For my website, I wanted to list of the plugins I used. I use them because they’re good, I like them, and having them on the share page … continue reading »
Here’s some tips for troubleshooting xdebug on VVV while using VSCode and Felix Becker’s PHP Debug extension and BrianGilbert_‘s Xdebug Helper for Firefox add-on. Ensure xdebug is turned on within vvv You may check xdebug status by taking a peak at your servers http://vvv.test/phpinfo/ page. If not on, via https://github.com/Varying-Vagrant-Vagrants/VVV/wiki/Code-Debugging we can toggle it on … continue reading »
The beautiful function wp_localize_script() was built for l11n, however its found as a method for carrying over server-side values into client-side JS. Your values are now available in your .js file: Currently using this in a React theme I’m building for WordPress. This can also be done with something like:
I had a project where every single media library image URL needed to be filtered, backend and front end. As far as I’ve found these were the filters for every area: The myplugin_filter_html_image_urls() function peals out images with regex from areas where it’s not just the URL being sent. This function may require verification of … continue reading »
Passing variables into WordPress hooks using an anonymous function I thought was impossible. I always worked around this and rewrote the logic. Today I found out anonymous functions support a use keyword, allowing passing: So simple and easy. Shaves hours of troubleshooting.
If you’re themes like most themes, and you have to fix your main elements CSS to accommodate Gutenbergs edge-to-edge capabilities on gutenberg-only pages, it’s good to know which pages are actually using Gutenberg. The follow will add a CSS body class for Gutenberg pages. Add conditions like !is_home(), get_post_type() != ‘post’, etc., to accommodate your … continue reading »
This sweet tidbit helps so much during development.
This little function allows a form to have reCAPTCHA hidden until a user begins entering form values.
A very annoying function. …the_date() only displays the date for the first post (that is, the first instance of the_date()).. So
I used to manually do everything for the Images section of my site. Adding an image would involve: save photo after editing, renaming it, uploading, creating new post, setting the title and date, assigning the featured image as the upload, then setting the category to Images so it’s added to the page. So, 8 steps, … continue reading »
As the lengthy title says, the follow simple script allows you to use a shortcode to dynamically output the number of years since a specified date. I wrote this for my own bio, which I used to have to update the number of years since the start of my employment once a year. The simple’r … continue reading »
For demo/home sites of a theme/plugin that wish to include the projects main readme files as part of the website, this quick snippet loads the folders README.md file, and parses the MarkDown (to githubs flavour) with a awesome jQuery plugin, all with the simple call of a [readme] shortcode.