WPCode Lite

INSERT HEADERS & FOOTERS + FULL WORDPRESS CODE SNIPPETS PLUGIN

WPCode is the most popular code snippets plugin for WordPress used by over 2 million websites. 

We make it easy for you to add code snippets in WordPress without having to edit your theme’s functions.php file.

Our simple insert headers and footers interface allows you to insert code like Google Analytics, custom CSS, Facebook Pixel, and more to your WordPress site’s header and footer as well other areas of your website. No need to edit your theme files!

Aside from Header and Footer scripts, you can also use WPCode to insert custom PHP code snippets, JavaScript code snippets, CSS code snipets, HTML code snippets, and text snippets with full conditional logic and code priority support.

We took the pain out of adding custom code snippets in WordPress and made it easy.

QUICK OVERVIEW OF WPCODE FROM WPBEGINNER

FUTURE PROOF CODE SNIPPET MANAGEMENT

Most WordPress tutorial websites ask you to add code snippets to your theme’s functions.php file. This makes managing code snippets messy, and it also prevents you from updating your theme.

If you ever update your theme or switch to another theme, then you will lose all custom code functions that you added in your functions.php file.

WPCode solves this by providing you an easy way to insert header and footer scripts along with other code snippets directly from your WordPress dashboard. These code snippets actually run as if they were in your theme’s functions.php file.

Our smart code snippet validation helps you prevent common code errors to ensure you never break your website when adding code snippets or header and footer scripts.

You can manage all your header and footer scripts as well as other custom code snippets from a single screen. We even make it easy for you to organize code snippets using Tags and add reminder notes with each code snippet.

FULL CODE SNIPPETS LIBRARY AND CODE GENERATORS

Ever wanted a central place to find all the most popular WordPress code snippets that are tested and proven to work?

When we started Insert Headers and Footers plugin, we did too. So we built a WordPress code snippets library right inside the WPCode plugin.

This makes it easy for you to customize WordPress functions with just a click using expert written code snippets.

You will find verified PHP code snippets for popular feature requests like disable REST API, disable XML-RPC, disable comments, allow SVG file uploads, disable Gutenberg, add Classic Editor, and more without installing separate plugins for each.

We also built the ability to save your code snippets to WPCode Cloud Library, so you can easily re-use it on your other websites, client projects, or even share it with the larger community.

WPCode Cloud Library helps you better organize your code snippets in one central location, so you can save more time and speed up your workflow when managing websites. No more wasting time looking for custom notes or Github gists.

Aside from our growing code snippets library, we also have WordPress code generators to help you quickly get ready-to-use custom code using the latest WordPress coding standards and API’s.

Examples of Custom Code Generators with Admin UI include:

  • Custom Post Type Generator – Create custom code snippet for Post Types.
  • Custom Taxonomy Generator – Get custom code snippet for Taxonomies.
  • WP Query Generator – Get custom code snippet for WP_Query to load posts.
  • Custom Sidebar Generator – Create custom code snippet to register custom sidebars or widget-ready areas.
  • Custom Widget Generator – Custom code snippet to register custom widgets.
  • Navigation Menu Generator – Custom code snippet for registering new navigation menu locations in your theme.

Aside from the above, we also have code snippet generator for scheduling a cron job, registering scripts & stylesheets, adding custom post status, and more.

CONDITIONAL LOGIC FOR CODE SNIPPETS + CODE INSERTION PRIORITY

Our goal with WPCode was to create a WordPress code snippets plugin that’s both EASY and POWERFUL.

That’s why aside from our global header and footer scripts, we added advanced features like conditional logic for code snippets and made it easy.

Instead of learning WordPress conditional logic queries, you can use our beginner-friendly conditional logic user interface to:

  • Load code snippets for logged in users only
  • Load PHP code snippets for specific user roles
  • Load PHP code snippets only on specific page URLs
  • Insert header and footer pixel scripts on specific pages
  • Show code snippets based on type of page
  • Run code snippet only on certain post types
  • Load header and footer code snippet based on referrer source
  • and more…

We also added both automatic code insertion and manual code output using shortcodes.

Our Auto Insert feature allows you to run the code snippet everywhere or choose from custom options like:

  • Run code snippet only on frontend
  • Run code snippet only in WordPress admin area
  • Add header and footer scripts sitewide
  • Insert PHP code snippet before or after post content
  • Insert code snippet before or after specific paragraph
  • Insert code snippet on specific archive pages
  • Insert code snippets after specific WooCommerce function (Pro Feature)

Aside from that, we also added a visual code snippet priority system, so you can choose the order for your custom functions to avoid code conflict.

And for even more flexibility and customization, we have added the ability for you to add page-specific code snippets right from the WordPress classic editor as well as the Gutenberg editor. You can even load code snippets based on device type such as mobile only code snippets, desktop only code snippets, etc.

IMPORT AND EXPORT CODE SNIPPETS

Managing multiple websites or developing in a staging environment?

We offer an easy way to import and export your custom code snippets, functions, and header and footer scripts to help you save time.

You can also save your code snippets to WPCode Cloud (Pro feature), so you can easily re-use the same code snippets across multiple websites. This also allows you to better organize your code snippets instead of wasting time searching for random Github gists.

Switching from another code snippets plugin?

We have an automatic import feature that imports your custom code snippets from both Woody Code Snippets and Code Snippets Pro plugin.

EXAMPLE USE CASES

WPCode is the most powerful code snippet + headers and footers plugin for WordPress. Here are some of the top use-cases why smart website owners and developers love us:

  • Insert Headers and Footers scripts
  • Insert Google Analytics Tracking Code in Header and Footer
  • Insert PHP Code Snippets or JavaScript code snippet without modifying theme’s functions.php file
  • Insert Facebook Pixels code, Google Conversion Pixels code, and other Advertising Conversion Pixel Scripts in WordPress header and footer with conditional logic
  • Insert Google AdSense Ads code, Amazon Native Contextual Ads code, and other Media Ads code
  • Insert Custom JavaScript, CSS, and HTML code
  • Insert Site Verification Meta tags for Social Media, Google Search Console, and other Domain verification in the header and footer of your site
  • Insert re-usable custom content blocks and PHP code snippets
  • Insert Ads code in content after specific paragraphs
  • Show or hide custom code snippets based on conditional logic
  • Disable XML-RPC, Disable Rest API, disable comments, allow SVG file uploads, disable Gutenberg and enable Classic Editor without adding extra plugins.

Simply put, WPCode is the one plugin that helps you get rid of dozens of other plugins without losing functionality.

FULL WPCODE FEATURE LIST

The simple interface of WPCode plugin (formerly known as Insert Headers and Footers) gives you one place where you can insert header and footer scripts as well as custom code snippets rather than dealing with dozens of different plugins.

Below is a full list of WPCode features:

  • Quick to set up
  • Unlimited code snippets
  • Simple to insert header and footer scripts globally
  • Beginner Friendly Code Editor with Syntax Highlighter for PHP, JavaScript, and HTML
  • Smart Code Validation to Prevent PHP Errors
  • Insert header code and/or footer code using Conditional Logic
  • Add Google Analytics code to header and footer
  • Add custom CSS code to any theme
  • Insert Facebook pixel code in header and footer
  • Insert any code or script, including HTML and Javascript
  • Insert PHP Code Snippets
  • Ready-made Code Snippet Library
  • Custom WordPress Code Snippet Generator
  • Show or Hide PHP Code Snippets based on conditional logic
  • Run PHP code and custom code snippets everywhere or in select areas using smart auto-insert rules.
  • Manually insert PHP code snippets using shortcodes anywhere on website
  • Add Rich Text Ads and Content Snippets automatically on posts & pages.
  • Export / Import Code Snippets
  • New Save snippets to Cloud Library – no more wasting time finding Github gists or custom notes. All your snippets stored in your private code snippet cloud.
  • New Deep integrations with Gutenberg, WooCommerce, and more.
  • Device specific code snippets (such as load code snippets on mobile only, desktop only, etc)
  • and more features coming soon.