This snippet allows you to get the WordPress feature image and use it as a background. Style it using the css class feature-bg. Remember to put the code around your content in your WordPress Template files. The code will dynamically take the feature image thumbnail if the current post has one.
My Atom installation wasn’t allowing me to beautify PHP in the editor. So if you are having the same issue then don’t worry! It’s simple to install PHP-CS-Fixer on Mac High Sierra. First we will need to run a couple of commands to download and install PHP-CS-Fixer. You can find the lastest info in the […]
Spotlight on MacOS can be heavy on the CPU usage. If you want to switch it off you then you will have to run a command in the terminal. Spotlight does provide some very nice functioniality, I don’t use spotlight itself. I use Alfred 3 which uses the same index data. If you disable Spotlight […]
Sometimes we want to display dynamic content based on where the visitor has come from. The place where the vistor link your website link from is called a “Referer”, so when someone clicks your link on Google, then Google is the referer. Using PHP we can target users coming from Google, we can then show […]
The sticky payment section in the Storefront Theme can be a little buggy. Sometimes it’s best to remove it. Here is how to make WooCommerce payment section non sticky. Just drop the code into your child themes functions.php
Always try to speed up the WooCommerce checkout as much as your can for your customers. A quick tip is to uncheck the “Ship to different address” checkbox by default. Customers do not commonly use this features and it’s a waste of their time having to untick it. So let’s speed up the time checkout […]
[cc lang=”php”] Copyright © wpsnippets.co
WordPress white screen after moving hosting? You might have a corrupted .htaccess file. There are many reasons your WordPress installtion could be showing a white screen. In some cases fresh .htacess file in the main directory can fix your WordPress site. I recommend renaming the old file via FTP or SSH. name it something like […]
WordPress normally sends emails from email@example.com. If you want you to change which email alias WordPress should send emails from, then you can put the following into into your functions.php or a plugin. I’ve also included the function to change the WordPress email sender name. Replace the email and name for your own site.
Update: This trick still works with MacOS High Sierra and Mojave 10.14+. Apple likes their computers quite so they leave the fans off for as long as possible. This could harmful if you are doing intense work or gaming in a hot location. I use SMC Fan Control to kick up the fans before the […]
You may have edited some config files for Apache, PHP-FPM, phpMyAdmin or MySQL, and now it’s time to restart for the changes to take affect. For reference, I’m running Bitnami WordPress on Google Cloud Compute Engine.
If you are getting the the same ERR_SPDY_PROTOCOL_ERROR error code in Google Chrome as as I have. Then we can try to fix it by flushin