• 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 utilities

utilities

Extract data attributes from WooCommerce html tag

August 4, 2021

/** * Extraction utility to get attributes from an HTML tag. * * Example given defaults to WooCommerce "data-" attributes, but you …

Continue Reading

Run WordPress in debug mode without access to wp-config

January 9, 2020

add_action( 'template_redirect', 'my_enable_debug_mode' ); function my_enable_debug_mode() { // Turn on error reporting. …

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

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

  • Bitnami WordPress Autoptimize cannot write to the cache directory
  • Create and delete WordPress sites in XAMPP with a batch file
  • How to fix “Error: MySQL Shutdown Unexpectedly” in XAMPP control panel
  • Fix missing Customizer in WordPress 6
  • Use Proofy.io API to validate WordPress registrations

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