WPCode – Insert Headers and Footers + Custom Code Snippets – WordPress Code Manager

WPCode – Insert Headers and Footers + Custom Code Snippets – WordPress Code Manager

Easily add code snippets in WordPress. Insert header and footer scripts, add PHP code snippets with conditional logic, insert ads pixel code, and more …
Rating:
4.9
star-rating-1star-rating-2star-rating-3star-rating-4star-rating-5
Active Installations:
2000000+
Last Updated:
May 15, 2025
WordPress Version:
4.6 or higher
Tested up to:
6.8.1

Easy Code Insertion

Add code snippets effortlessly

Future-proof Management

Never lose custom code functions again

Central Code Library

Access verified code snippets instantly

Conditional Logic Support

Load code snippets based on specific conditions

2.2.8

  • New: Schema Generators – we added 20 new code generators to make it easier to manage schema code on your website.
  • Tweak: We moved the button to update generated snippets to the top so that you can update snippets easier.
  • Tweak: We added “suppress_filters” to WP_Query used by WPCode to avoid conflicts with other plugins.
  • Fix: We fixed an issue where the generated snippets were not automatically inserted when activated.

2.2.7

  • New: Added support for automatically importing snippets from 2 new plugins.

2.2.6

  • New: Easily find where your snippet is used as a shortcode with our new shortcode finder tool. 1-click search through your site.
  • New: Improved editor for snippet notes. You can now add links and format text with a WYSIWYG editor.
  • New: Snippet notes column. Display the notes for each snippet in the list of snippets.
  • Fix: We improved the code snippets list filtering in the admin to avoid issues when JS errors are encountered on the page from other scripts.

2.2.5

  • New: We added a new way to quickly filter snippets by code type in the list of snippets.
  • Tweak: Prevent content_save_pre from modifying snippet code.

2.2.4.1

  • Fix: Shortcode attributes variables were not being set correctly.

2.2.4

  • Tweak: We adjusted the way our plugin adds a version-specific body class to avoid conflicts with other plugins.
  • Tweak: We improved the way custom PHP code is executed to avoid conflicts with variables in snippets.
  • Fix: When removing the last Conditional Logic group the rule selector was no longer working.

2.2.3.1

  • Tweak: Updated the way we load translatable strings in some components for compatibility with WordPress 6.7.

2.2.3

  • Tweak: We updated the way we validate PHP snippets when making an edit to an active snippet for better feedback when debugging.
  • Tweak: We replaced a dependency (SweetAlert2) for a more lightweight alternative to improve performance.

2.2.2

  • New: The Add Snippet screen now makes it easier to get started with more than just our library of snippets, choose from expert-picked snippets, snippet generators or plugin-specific snippets.
  • New: We updated the code type picker for more clarity on what each code type is useful for and the last code type you used is now saved for a streamlined experience when adding multiple snippets.
  • Tweak: We extended the unfiltered HTML permissions notice when the DISALLOW_UNFILTERED_HTML constant is defined to add more clarity.

2.2.1

  • Fix: We fixed a bug that was causing the selected conditional logic operator to not be displayed correctly for some rules.
  • Fix: The auto-insert location picker was not opening again in some situations.

2.2.0

  • New: We updated the conditional logic rules picker for more clarity and ease of use.
  • New: We expanded our automatic cache clearing to include the Swift Performance plugin.
  • Tweak: The Page URL conditional logic option now supports query params and wp-admin URLs.

2.1.14

  • New: When making changes to the Global Header & Footer WPCode will attempt to automatically clear page cache for popular caching plugins.
  • New: Save your snippet with a keyboard shortcut by pressing CTRL+S (Windows) or CMD+S (Mac) in the snippet editor.
  • Tweak: Prevent error when TinyMCE is disabled by other plugins.

2.1.13

  • New: We added admin-specific locations for header and footer to streamline customizations in the wp-admin area.
  • New: The code editor height can now be adjusted directly from the snippet editor screen. Auto-height is still available as an option on the settings page.
  • Fix: When making changes to a snippet, the function to prevent you from navigating away was no longer working.

2.1.12

  • New: We added a new way to execute PHP snippets “On Demand” – look for the “On Demand” location in the Auto Insert settings.
  • Tweak: We added checks in place to prevent malicious code patterns from being used in WPCode.
  • Fix: We fixed a bug where the conditional logic for logged-in users was not being saved correctly the first time.

2.1.11

  • Tweak: We improved the admin bar menu to fix an JS error in some scenarios and a html validation issue.
  • Tweak: We added support for importing snippets from the Code Snippets Pro plugin.
  • Fix: We fixed an issue with importing CSS snippets.

2.1.10

  • New: When another user is editing the same snippet, we now show a warning to avoid conflicts.
  • Tweak: Improved mobile styles across the plugin admin for better readability.

2.1.9

  • New: Conditional logic rule for Blog home page (posts page)
  • Tweak: Improved the connect to library flow to avoid the connect window from getting blocked.
  • Fix: Author archive condition was not working as intended.

2.1.8

  • Tweak: We changed the way the code generators are loaded to improve performance overall.
  • Tweak: We changed the way translations are loaded for better performance.

2.1.7

  • New: WPCode now has a Dark Mode for those late night coding sessions. Enable it on the settings page.
  • Tweak: We improved the way the error messages are displayed in the snippet editor for more clarity.
  • Fix: The snippet editor was no longer running syntax checks for PHP snippets upon activation.
  • Fix: We fixed a bug where in certain versions of Safari the auto-insert location was being unset when saving a snippet.

2.1.6

  • New: We added the option to delete all the plugin data on uninstall.
  • Fix: The code of duplicated snippets was sometimes removing some slashes.
  • Fix: Error count was not correctly updated when snippets were trashed or deleted.

2.1.5

  • New: Priority column added to the list of snippets, order by snippet priority.
  • Fix: Fixed a notice that was being thrown in new sites when running the installation routines.
  • Fix: Filtering by tag or location in the list of snippets was not working correctly.

2.1.4.1

  • Fix: Avoid notices for errors that don’t include the file parameter.
  • Fix: Improve compatibility with PHP 8.2 for the snippet cache class.

2.1.4

  • New: Enhanced error tracking: Errors generated by PHP snippets on your website will be displayed within the snippet’s context, simplifying the debugging process.
  • New: We’ve refined the snippet auto-deactivation process. Now, only snippets that produce fatal errors in the admin section will be deactivated. All other errors will be reported through the newly implemented error tracker.
  • New: We introduced three new columns to the snippet list: ID, Code Type, and Shortcode.
  • Tweak: We’ve enhanced our file caching mechanism to prevent redundant requests in scenarios where files aren’t written properly due to certain setups.
  • Tweak: We’ve implemented an additional check to ensure that closing PHP tags don’t disrupt the execution of snippets.
  • Fix: We’ve corrected the sorting of snippets when arranged by their last updated date.

2.1.3.1

  • Fix: Shortcode attributes were not being correctly parsed in some scenarios.

2.1.3

  • New: We improved how we manage automatic snippet disabling when errors occur. You’ll now get detailed insights into which snippet is responsible for the error and the exact line where the problem occurred.
  • Tweak: We adjusted the way snippets are preloaded to improve compatibility with object cache.
  • Fix: The snippets added as shortcodes were not correctly displayed in the admin bar.

2.1.2

  • Tweak: We adjusted the way snippets are tracked in the Admin Bar Code Spotter to avoid wrong numbers in certain locations.
  • Tweak: We improved the way the Admin Bar Code Spotter menu is loaded for better compatibility with other plugins and older themes.
  • Tweak: Changed the way assets used by the admin bar are loaded to avoid errors if the head is loaded multiple times.

2.1.1

  • New: Easily duplicate a snippet with all of its settings with the new Duplicate link in the list of snippets.
  • Fix: Taxonomy page conditional logic was not being correctly assigned for category and tags archives.
  • Tweak: Adjust admin bar markup to avoid using a heading.

2.1.0

  • New: See exactly which scripts and snippets are loaded on the current page with the WPCode admin bar info menu.
  • Tweak: Minor update to connect process.

Very useful!

By mody737 on June 26, 2025

Easy to make it work

Easy Setup, Excellent Plugin

By khuldesigns on June 24, 2025

Its plugins like these that make us all even, new and old, Pro's & Armatures

Does everything you need!

By davecarr on June 24, 2025

This is a great way to add code snippets without constantly having to manage your functions.php file. You can modify functionality very simply and enable and disable with ease. It should be a core part of wordpress!

Very Good Plugin

By globaltech91 on June 22, 2025

This is very good plugin for inset custom code in our running website safely.

Cool plugin

By rahulawp on June 21, 2025

Really cool plugin. Helps me to write snippets from within wordpress web interface so that I don't need to login to my remote server. I am running multiple snippets, some that I have configured to be run as a plugin by calling hooks and others to be inserted as blocks using shortcode. Overall, super useful plugin!

Most amazing Snippets Plugin

By webscrafts on June 21, 2025

I've been using the WPCode Snippets plugin for a while now, and it's been an incredibly helpful and enjoyable experience. It allows me to manage custom code snippets easily without touching the theme files, keeping everything organized and safe—even during theme or plugin updates. The interface is clean, user-friendly, and makes adding or disabling code a breeze.

Whether it's adding custom PHP, JavaScript, or CSS, WPCode has made the process seamless. It's a must-have tool for anyone who regularly works on WordPress websites. Kudos to the developers for creating such a smart and reliable plugin!

Thank you for 100% solution

By Muhammad Usman (usman661) on June 20, 2025

This is my most favourite plugin for adding customization

Great Plugin & Works Exactly as Advertised!

By (techjaws) on June 19, 2025

Everything this plug-in does went way above my expectations. The interface is a breeze and the output is perfect. There's so many options!

Great Plugin

By thm22 on June 19, 2025

I am using this to add various tags to our website. Works great.

Small flaws but works beautifully overall

By arjenbroeze on June 19, 2025

Very easy to use plugin to add custom code to your Wordpress site. I have several sites that make intensive use of the plugin. The affordable Pro-version even comes with a history of changes so you can compare versions. Even though there is room for improvement (restoring older versions of a snippet doesn't always restore correctly for example), it's highly recommended.

Try other plugins too!

TJ Custom CSS

Easily to add any Custom CSS code to your WordPress website.

Try Demo More Details

Head, Footer and Post Injections

Header and Footer plugin let you to add html code to the head and footer sections of your blog page, inside posts… and more!

Try Demo More Details

Custom CSS/JS

WP Custom CSS JS plugin allows you to add any HTML, CSS, Javascript, jQuery or Tracking Pixel easily on your wordpress site right from your dashboard.

Try Demo More Details
Screenshots
Author Site Author Site

Try WPCode – Insert Headers and Footers + Custom Code Snippets – WordPress Code Manager With InstaWP

Contact Sales

Reach out to us to explore how InstaWP can benefit your business.