Block wp-login.php and xmlrpc.php via fail2ban on RunCloud

How to ban IP addresses that are brute forcing your wp-login.php and xmlrpc.php on a WordPress install with fail2ban on a RunCloud server. Email yourself any fail2ban IP addresses.Add a WordPress fail2ban filterCreate a wordpress.conf file in /etc/fail2ban/filter.d/[Definition] failregex =…
Output a Custom Taxonomy Archive by using Loop in WordPress

You can’t use a WordPress archive taxonomy page for a custom taxonomy as the custom terms are the archive – but you may want a sort of global taxonomy page that contains all the custom terms.Here is a custom taxonomy…
Keep WordPress database leaner by removing autoloaded options from wp_options table

In WordPress a number of autoloaded options are loaded on every page, this gathers over time with deleted themes, plugins etc and can slow down a site. Typically most options that are installed in the database are permanently stored. These…
Change WooCommerce Checkout Page To A 2-Column Layout

The default WooCommerce checkout page layout doesn’t make great use of a 2nd right hand column and looks a bit disjointed. Here is some CSS that can push the product order data to the 2nd column balancing the layout more…
Set up WordPress cron to run via server cron in cPanel, Cloudways and RunCloud

By default the WordPress tasks that have been set up to run with wp-cron.php only run when a WordPress page is visited by a user, if the site has low traffic then tasks make take a while to action, if…
Using wp-cli commands to create and import WordPress databases

You can use wp-cli to do a number of tasks around the WordPress database including creation and importing, below are a few commands and what they do.Remove all existing WordPress tableswp db resetThis will remove all existing WordPress tables and…
Add full screen window canvas to back to icons when searching in Beaver Builder

In a recent Beaver Builder update the canvas size for an icon search was humbly shrunk as some users didn’t like the vast open lands of icon city.With a bit of CSS code injected into the backend, the icon canvas…
Completely hide WooCommerce products from shop, product search and WordPress search

You can hide a WooCommerce product from the shop page and product search by choosing ‘Hidden’ in the ‘Catalog visibility’ options from the Publish metabox on a product page in the backend. This is good and it hides the product…
Set noindex nofollow on posts from specific category using Yoast WordPress SEO

Using the Yoast WordPress SEO filter wpseo_robots filter you can set posts from a specific category to have the meta tag set with noindex/nofollow.add_filter( ‘wpseo_robots’, ‘yoast_seo_robots_remove_single’ ); /** * Set certain posts to noindex nofollow */ function yoast_seo_robots_remove_single( $robots )…
Remove add to cart button on WooCommerce products that belong to a certain category

Here is some code to allow you to hide the Add to Cart button on WooCommerce products that belong to a certain category, so if the product page is viewed by a customer they will be unable to add the…