Category Archives: Code Snippet

Remove /?doing_wp_cron from URL

Do you have “/?doing_wp_cron” in every URL on your WordPress site? It happened to me recently on one of my site and bothered me a lot, because it attached itself to every URL on the website.

Continue Reading →

How to increase Max Input Vars on DreamHost shared hosting account

We mentioned how to change PHP settings on GoDaddy share hosting account a while ago, it is done in .user.ini file. This is a fairly common hack that can be applied to other similar hosting account at different hosting companies. However, DreamHost uses a different approach. Here is how we do it at DreamHost:

Continue Reading →

Code Snippet: Redirect All Emails on Staging Site

When troubleshooting a production site, one of the challenge is dealing with the email communication. For example, we need to debug a problem on eCommerce website, but don’t want the actual client get interrupted by all the testing emails. Here is the code I use in troubleshooting. It redirects all outgoing emails to me without disturbing any registered user.

Continue Reading →

How to increase Max Input Vars on GoDaddy shared hosting account

When setup some of the WordPress themes, you may see Maximum Input Vars notification. It asks you to increase Max Input Vars in your host to be able to use the theme. After searching for help, you may find several options. But in my case for a WordPress installation on GoDaddy shared hosting account, only one works.

Continue Reading →

Disable WordPress Author Pages

Author page is part of WordPress by default. Without manual change, author page URL exposes user login username. From SEO point of view, it may also create duplicated content. For blog website, author page is useful when there are multiple authors. For non-blog site, especially for site without no blog post, it is good idea to disable the access to author page.

Continue Reading →

WooCommerce Template Customization: Mobile Responsive Product Quantity Input Template

Although WooCommerce default page templates are mobile responsive overall, further polish is required to match the theme for each specific project. In one of my latest projects, I ran into the problem with default WooCommerce product quantity input box. It is designed for desktop browser, using a mouse and / or keyboard as input device. On mobile device, especially smartphone, changing product quantity can be fussy.

Continue Reading →

WooCommerce Subscriptions Customization: Restore Additional Profile Field Added by PMP Register Helper

Can’t find a good title for this one. Here is the background. On a membership website, the membership feature was achieved by using Paid Membership Pro (PMP) plugin. An extra profile field was added using PMP Register Helper. Few months ago, a WooCommerce online store integration project brought in WooCommerce Subscriptions plugin to replace the membership purchase and recurring billing function which were provided by PMP. If you happen to be on the same boat, you know exactly what happens: The PMP check out page is replaced by WooCommerce checkout page. The additional profile filed is also bypassed.

The task: to restore the additional profile field using WooCommerce filter & hook.

Continue Reading →

BackWPup: SSL3_GET_SERVER_CERTIFICATE: certificate verify failed

I backup database daily, and send multiple copies to different locations. One is my Amazon S3 bucket for backups. If backup task failed, a notification email will be sent to me. And I am getting notification email of this sort recently, constantly from one website. One time isolated failure can be ignored for temporary cause (bad connection for example), not continuous failures.

Continue Reading →

How to Create a WordPress Plugin

Plugins are ways to extend and add to the functionality that already exists in WordPress. We don’t have to be a dedicated plugin developer to write WordPress plugin. There are situation where we need to alter some existing functions, or add some features to existing site. You may learn from various resources that, to add this, you need to drop code snippet to function.php. The fact is, making changes to function.php isn’t always the best solution.

Continue Reading →