• 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
You are here: Home / Archives for Code Snippets

Compare versions in WordPress

December 17, 2019

/** * Use PHP's version_compare() to check the version * of WordPress (or a plugin or theme for that matter). * * Get currently …

Continue Reading

Enable error logging in wp-config.php

December 5, 2019

/** * The WP debug constants. * * These are used in wp-config.php to enable debugging. * * NOTE all of these MUST be inserted in …

Continue Reading

Error log utility function

December 5, 2019

/** * Writes string, array, and object data to the WP error log. * * To use, pass the result to write to the log as follows: * …

Continue Reading

Call a shortcode function by tag name

December 3, 2019

/** * Call a shortcode function by its tag name. * * Directly executes a shortcode's callback function using the shortcode's * tag …

Continue Reading

Display a WordPress login form

October 21, 2019

$args = array( 'echo' => true, 'redirect' => 'https://wpbitz.com', 'form_id' => 'loginform', 'label_username' => __( …

Continue Reading

  • « Go to Previous Page
  • Go to page 1
  • Go to page 2
  • Go to page 3
  • Go to page 4

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