Halloween Sale 15% off Ends in See the plans

Snippet Library

Developer snippets for WordPress

Snippets for developers: debugging helpers, custom cron schedules, body classes, REST API tweaks and admin tools for checking hooks and queries. Building blocks for people who write code for WordPress every day.

1–16 of 16 snippets “code”

  • PHP Developer

    Add Your Own Setting to the Customizer

    Adds a "Site extras" section to Appearance > Customize with a footer note and a contact phone field that preview live, and makes them available with a [site_extra] shortcode, as a pattern for your own settings.

  • PHP Developer

    Find Posts Using a Shortcode (WP-CLI)

    Adds a "wp find-shortcode" command that lists every post, page or custom post that contains a given shortcode, with its status and edit link. Handy before removing a plugin.

  • PHP Developer

    Measure How Long Code Takes

    Adds wpide_timer_start() and wpide_timer_stop() helpers that measure the time and memory a piece of code uses and write the result to the PHP error log, to find slow functions.

  • PHP Developer

    Private Log File Helper Function

    Adds a wpide_log() helper that writes timestamped messages and data to a daily log file in a protected folder inside uploads, so custom code can leave a trail without touching debug.log.

  • PHP Developer

    REST API Error Log Under Tools

    Records REST API requests that fail with a 4xx or 5xx status, with the route, method, user and error code, and lists the latest 100 under Tools > REST Errors for debugging integrations.

  • PHP Developer

    Searchable Options Viewer Under Tools

    Adds a Tools > Options Viewer screen where administrators can search the options table by name and see each value decoded and pretty-printed, including serialized arrays that Settings > All hides.

  • PHP Developer

    Displays the current screen ID, base, post type and hook suffix in the admin footer for administrators, which is exactly what you need when targeting a screen in your own code.

  • PHP Developer

    Simple Site Details Settings Page

    Adds Settings > Site Details where you can store your phone number, address and opening hours once, then show them anywhere with [wpide_site_detail key="phone"].

  • PHP Developer

    Subtitle Field for Posts

    Adds a "Subtitle" box to the post editor, saves it securely and provides a [wpide_subtitle] shortcode and a helper to display it in your theme.

Have a snippet worth sharing?

Publish it to the library from WPIDE or right here. Sign in with any WordPress site that runs WPIDE, free or Pro. Public snippets are reviewed by the WPIDE team before they appear.