As seen on the https://clicknathan.com blog: How to Allow Subscribers to Delete Posts from the Front End while Still Blocking the Admin Area Allow WordPress Authors to Delete their Posts from the Front End Additionally, here is a simple script to put within the loop to display a delete link for anyone with the rights to Full Article…
Use Cron to run a php script from a URL
If your php script can be invoked using an URL, you can lynx, or curl, or wget to setup your crontab as shown below. The following script executes the php script (every hour) by calling the URL using the lynx text browser. Lynx text browser by default opens a URL in the interactive mode. However, Full Article…
Set a cron job to replace the default WordPress cron
Set your cron time / path to php / path to your php script Adding >/dev/null 2>&1 on the end prevents an email from getting sent each time the cron if triggered.
How to view the number of unique visitors to a page
As seen here: http://www.martinlugton.com/view-number-unique-visitors-page-set-pages-google-analytics/ You can see the number of unique visitors to your site as a whole in Google Analytics’ Audience report. But if you go to Behavior > Content Drilldown, to view a particular page of set of pages, you can only see “unique page views”. Unique page views is a different measure to Full Article…
Detect the WordPress login page
As seen here: https://stevegrunwell.com/blog/quick-tip-is_login_page-function-for-wordpress/ Add this function: Then you can use:
Clean a hacked WordPress website
Use the online RedLeg fileviewer to scan the website in question for malware, malicious redirects, malicious scripts and other bad stuff. Use the online deobfuscate javascript tool to deobfuscate javascript if scripts have been hidden. Some good practises to keep your website free from hacks: Update WordPress to the latest version Web-server hosting WordPress should Full Article…
How to move content and media from one WordPress website into another
This is an awesome article written by Tom Ewer found on wpmudev. Moving your WordPress site to another location can be a stressful and fiddly experience, not helped by the fact you can’t just simply move your files and database. No, that’s just not how WordPress works. Fortunately, WordPress has a handy “Import” and “Export” Full Article…
Slick View Mode Switch/Toggle
As seen on CodeDrops and GitHub. A simple view mode switch that has two example layouts, a grid and a list. A layout switch with two viewing modes: grid and list. The layout is defined by a view class that gets applied to the main wrapper. Some example media queries show how to make things Full Article…
How to Add Information to WooCommerce Emails
As seen here: https://www.sellwithwp.com/how-to-add-information-to-woocommerce-emails/ WooCommerce emails include each line item in an order by default within an “order items” table. This table is automatically included in almost every WooCommerce transactional email, and displays the product quantity, price, and total. However, this isn’t the only data that WooCommerce has available for the order items table in its Full Article…