WordPress
WordPress Comment Form – Remove Website Field
Are you getting comment spammed by link building bots? Pull off the ‘website’ field from the form by adding this to your functions.php file.
Finding, Deleting and Cleaning Orphaned Post Meta in WordPress
NOTE: Please remember to backup your database before doing any SQL level deletes. Over time, the wp_postmeta table can get littered with a number of records. These linked meta data rows are not always removed when posts from the wp_posts table are deleted. While WordPress has well optimised the wp_postmeta table, it might be wise…
WordPress Fix – the_date() Function Returning Blank Value
Are you are using the_date() function in WordPress templates and getting a blank or empty value? When more than one post is published on the same day, the_date() function displays only the date for the first post in the loop. The right way to handle this is by using the the_time() function. Try this: [php]…
WordPress – Changing The Site URL Using WP-CLI Command Line Tool
The WP-CLI command line tool is a handy application to run various WordPress tasks. Download the WP-CLI command line tool into the WordPress root folder using CURL or WGET. [bash] curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar [/bash] Check if the tool is working. [bash] php wp-cli.phar –info [/bash] Not run the search and replace command to look through all…
Yoast Google Analytics Reassign ‘__gaTracker’ Tracker to ‘ga’ Variable
Google Analytics by Yoast is a must have plugin for all WordPress installs. It makes adding GA trackers a breeze and it can also ping certain events to Google Analytics. The only unexplained bit of code is the issue. At some point, the ‘ga’ variable changed to ‘__gaTracker’. This raised some concerns among the techy…
WordPress Contact Form 7 – Tracking Form Submissions in Universal Analytics
Are your Contact Form 7 submissions not working fine? Is the ‘Thank You’ success message flashing for a second and disappearing? The problem might be in the on_sent_ok hook. The standard recommendation on the Contact Form 7 website is to use the following code. [js] on_sent_ok: “_gaq.push([‘_trackEvent’, ‘Contact Form’, ‘Submit’]);” [/js] The above code will…