If when adding or editing a post (or Page, Product etc) and the dropdown field is missing therefore stopping you from selecting your template file make sure each file includes this line in the header section: Here is an example for the full header:
If when adding or editing a post (or Page, Product etc) and the dropdown field is missing therefore stopping you from selecting your template file make sure each file includes this line in the header section: Here is an example for the full header:
Let’s say you have two plugins installed in WordPress and you need to run a function in PluginB from PluginA. This code will allow you to do this: Code for PluginB Here we are calling the custom action created in PluginA called plugin_a_custom_action. This code will check that PluginA is active and then get the […]
If your website is having a lot of traffic from an IP address and you would like to redirect them to a landing page, here is the code to do it. With this WordPress function which you can add to your functions.php file, you can add IP addresses into the array called $blocked_ips and change […]
To turn off the browser autocomplete for HTML form fields you use the command autocomplete=yes. If the field is an email field like: You can use the autocomplete=”email” too. Now that is easy, right?However, the autocomplete command is only a signal to the browsers to act on and is not guaranteed. Sometimes they just ignore […]
If you have read another one of my posts about Stop Fake Spam WooCommerce Orders you will know how important it is to secure your Woocommerce – in fact any website platform – checkout page from bots testing their stolen credit cards.That’s right, one of the most common ways for thieves to test if their […]
Have you received one or many attempts of fraudulent orders on your WooCommerce WordPress website, as one of my clients did, here are some solutions to reduce this from happening in the future. What this will do is run a function called spam_account which will compare the name. the first line in the address, phone […]
Quite a long post title this one, if you would like a function in WordPress/WooCommerce to list the top 3 other products bought at the same time as a supplied product_id here is the code. I am using MySQL join commands to connect up the following three tables:postswoocommerce_order_itemswoocommerce_order_itemmeta Here is the function to add to […]
A client of mine required a button that would remove all Add to Cart buttons throughout the site from a single click. They used this for temporarily stopping purchases if their prices needed changing.This is particularly handy for emergencies! You might need a button to do this for many reasons, but it is not needed […]
To stop a WordPress plugin from asking to be updated you need to add the following code in your functions.php file. It is very easy to do and shouldn’t take long at all.The main filename of a plugin is often the same as the folder name. This really only should be used if you REALLY […]
Sometimes you need to add some extra functionality to the backend of WordPress, whether to add a button in the main Dashboard page, an extra menu option in the main sidebar menu or even a whole new section in there. When I tried looking for a solution to add a button on the Dashboard page […]