Category Archive: WordPress
Posts about WordPress
Recently I needed a programmatic way to trigger a 404 error in one of my free WordPress plugins. Fortunately WordPress makes it very easy to do. This quick tutorial explains two different ways to make it happen.
Here is a quick example showing how to modify the main WP Query (Loop) using the pre_get_posts filter hook.
If you try to log in to some of my WordPress-powered sites via the WP Login Page, you will be met with a 403 “Forbidden” response. For sites where I am the only registered user, I lock things down to prevent endless waves of drip force attacks. It really helps to reduce server load, conserve […]
Recently I needed to view all posts that were password-protected. Not finding a WordPress function for this, I wrote a quick SQL command to find all password-protected posts in the WordPress database.
Typically when you want to remove an option from the WordPress database, you can use a function like delete_option(). But there are cases where such functions are insufficient. For example, in a previous version of my plugin Blackhole for Bad Bots, a database option is added for each blocked request, and each option name includes […]
On a recent project, I found myself viewing the HTML source for every post and page on a WordPress-powered site. After about a thousand clicks, I decided to write a code snippet that adds a “View HTML” button (it’s actually just a link) for each post row displayed on the WordPress “Edit Post” screen. So […]
After months of hard work, I am pleased to announce the launch of my new video course on running WordPress on shared hosting. This course shows you how to get your own WordPress-powered site up and running as quickly and inexpensively as possible. It walks through the entire process step-by-step, with helpful visuals and examples […]
Archives that are easy to navigate make your WordPress-powered site that much more awesome. There are plenty of great strategies for increasing the usefulness of your post archives. For example, this quick tutorial provides some custom functions that display monthly navigation links. So you can display “Previous Month” and “Next Month” links on monthly archive […]
Developing my WordPress plugins recently, I noticed that Chrome was removing the query-string parameters from the URL as displayed in the browser’s address bar. Likewise Firefox and others were not showing the full URL in the address bar, which was making development difficult, as I was testing URL redirects involving query parameters at the time.
Working on WordPress development and testing HTML forms in Chrome browser, I ran into the following error: This page isn’t working Chrome detected unusual code on this page and blocked it to protect your personal information (for example, passwords, phone numbers, and credit cards). ERR_BLOCKED_BY_XSS_AUDITOR
Depending on your WordPress configuration, plugins, and so forth, your site may be suffering from “self-pings”. Self-pings are pingbacks from your own domain, which are not necessary and look kind of silly displayed alongside other, actual pingbacks. If your site is haunted by self-pings, here is a quick code snippet to stop them.