• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP Bitz

A curated collection of code snippets for WordPress

  • Home
  • About
  • Blog
  • Code Snippets

Blog

Block an IP address from accessing your site

WordPress Development Tips · June 19, 2020

Generally, you can use your .htaccess file to block access to your site from certain IP addresses. This can be an effective method of …

Continue Reading

Using WordPress Debug Constants

WordPress Development Tips · February 6, 2020

Here are some constants you can define in your wp-config.php file to assist with debugging. Note that debugging should not be enabled on …

Continue Reading

Save WordPress debug log by date

WordPress Development Tips · February 2, 2020

It's not recommended to keep debugging enabled on a production site. But sometimes you may need to in order to gain the data you …

Continue Reading

Utility function for the WordPress error log

WordPress Development Tips · December 5, 2019

There is function for writing information to the WP error log file - error_log(). The problem is that the function doesn't handle arrays …

Continue Reading

How to Create a Site Specific Plugin

WordPress Development Tips · December 4, 2019

A common question I get when supporting WordPress users is "where to I put this custom code snippet." A frequent and simple answer to …

Continue Reading

Don’t Use do_shortcode()

WordPress Development Tips · December 3, 2019

The Internet abounds with examples of bad practices in WordPress development. Using do_shortcode() unnecessarily is one of the most …

Continue Reading

Primary Sidebar

Join for free!

Get free code snippets, WordPress best practices, and practical Content Marketing advice from seasoned WordPress expert Chad Butler (butlerblog):

Recent Posts

  • Block an IP address from accessing your site
  • Using WordPress Debug Constants
  • Save WordPress debug log by date
  • Utility function for the WordPress error log
  • How to Create a Site Specific Plugin

Copyright © 2021 · Maker Pro on Genesis Framework · WordPress · Log in