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


Insert Headers & Footers + Full WordPress Code Snippets Plugin

WPCode (formerly known as Insert Headers and Footers by WPBeginner) is the most popular code snippets plugin for WordPress used by over 1 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.

I have been using Insert Headers and Footers and it is such a useful tool. Super helpful and the very best of its kind. Highly recommend
The_Gibble – WordPress user

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.

This plugin allows me to not only add things to my site whenever needed, but it takes me only seconds to accomplish it.
David Weber – WordPress user

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.

I was very hesitant to get into any of the code for my website. Your plugin made it easy for me to do.
Conbrio75 – WordPress user

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

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.

This is such a useful plugin! It makes it so much easier to include things on your website!
Understoryliving – WordPress user

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.

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.

Simple plugin I use in quite every site. Very useful to insert scripts and tags.
tommasoperego – WordPress user

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:

  • E shpejtë të ujdiset
  • 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
  • Futni çfarëdo kodi apo programthi, përfshi HTML dhe 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
  • and more features coming soon.


Shtojca “Futni Kryefaqe dhe Fundfaqe” qe krijuar së pari nga Syed Balkhi dhe ekipi WPBeginner më 2011-n.

It was later rebranded to WPCode in 2022 by Syed Balkhi to add powerful code snippets features that users were requesting for.

Branding Guideline

WPCode™ is a trademark of WPCode LLC. When writing about the Insert Headers and Footers – Code Snippets plugin by WPCode, please make sure to uppercase the initial 3 letters.

WPCode (correct)
WP Code (incorrect)
wpcode (incorrect)
wp code snippets (incorrect)


Nëse kjo shtojcë ju duket e dobishme për të futur kryefaqe dhe fundfaqe + copëza kodi, ju lutemi, jepnani një vlerësim të mirë dhe shihni mundësinë e provës së projekteve tona të tjera:

  • WPForms – #1 drag & drop online form builder for WordPress (trusted by 5 million sites).
  • OptinMonster – Get More Email Subscribers with the most popular conversion optimization plugin for WordPress.
  • MonsterInsights – See the stats that matter and grow your business with confidence. The best Google Analytics plugin for WordPress.
  • SeedProd – Create beautiful landing pages with our powerful drag & drop landing page builder.
  • WP Mail SMTP – Improve email deliverability for your contact form with the most popular SMTP plugin for WordPress.
  • RafflePress – Best WordPress giveaway and contest plugin to grow traffic and social followers.
  • Smash Balloon – #1 social feeds plugin for WordPress – display social media content in WordPress without code.
  • AIOSEO – The original WordPress SEO plugin to help you rank higher in search results (trusted by over 3 million sites).
  • Push Engage – Connect with visitors after they leave your website with the leading web push notification plugin.
  • TrustPulse – Add real-time social proof notifications to boost your store conversions by up to 15%.
  • SearchWP – The most advanced custom WordPress search plugin to improve WordPress search quality.
  • AffiliateWP – #1 affiliate management plugin for WordPress. Add a referral program to your online store.
  • WP Simple Pay – #1 Stripe payments plugin for WordPress. Start accepting one-time or recurring payments without a shopping cart.
  • Easy Digital Downloads – The best WordPress eCommerce plugin to sell digital products (eBooks, software, music, and more).
  • Sugar Calendar – A simple event calendar plugin for WordPress that’s both easy and powerful.
  • WP Charitable – Top-rated WordPress donation and fundraising plugin for non-profits.

Visit WPBeginner to learn from our WordPress Tutorials and find out about other best WordPress plugins.


“Futni Kryefaqe dhe Fundfaqe” nga WPCode është rruga më e lehtë për të futur kod në kryefaqet dhe fundfaqet tuaja WordPress.

Synimi ynë ta bëjmë të lehtë përdorimin e WordPress-it, me shtojcat tona WordPress dhe burime të tilla si WPBeginner, sajti më i madh burimesh WordPress për fillestarë.

Më duket se e kemi bërë këtu. Shpresoj që “Futni Kryefaqe dhe Fundfaqe” t’ju duket e dobishme për të shtuar programthe në sajtin tuaj.

Syed Balkhi

Foto ekrani

  • WordPress Code Snippets Management Screen
  • Ready-Made Code Snippets Library
  • Edit PHP Snippets with Code Syntax Highlighter
  • Show / Hide Code Snippets with Smart Conditional Logic
  • Custom WordPress Code Generators
  • Example of Custom Post Type Generator
  • Insert Header and Footer Scripts Globally
  • Import and Export Code Snippets


  1. Instaloni shtojcën WPCode – “Futni Kryefaqe, Fundfaqe dhe Copëza Kodi” duke ngarkuar drejtorinë insert-headers-and-footers te drejtoria /wp-content/plugins/. (Shihni udhëzimet mbi si të instalohet një shtojcë WordPress.)
  2. Activate WPCode – Insert Headers, Footers, and Code Snippets plugin through the Plugins menu in WordPress.
  3. Insert code in your header and footer or add custom code snippets by going to the Code Snippets menu.


A mund të përdor WPCode – “Futni Kryefaqe dhe Fundfaqe” që të instaloj Google Analytics?

Po, mund të futni kod Google Analytics te fusha Programthe në Kryefaqe.

A mund të përdor WPCode – “Futni Kryefaqe dhe Fundfaqe” për Google AdSense?

Po, që të verifikoni llogarinë tuaj, apo t’i vini shenjë faqes tuaj për reklama të automatizuara, ngjiteni kodin që ju jep AdSense-i te Programthe në fushën Kryefaqe.

Will I lose my snippets if I change my WordPress theme?

No, the idea behind WPCode – Insert Headers, Footers, and Code Snippets plugin is so you can safely add code snippets.

All code snippets are stored in the WordPress database, independent of the theme upgrades.

Can I switch back to the old version of Insert Headers and Footers?

Yes, if you don’t want the advanced code snippets functionality, then you can switch back to the old Insert Headers and Footers features by simply going to the Settings Menu and clicking on the Headers & Footers mode.

What Type of Code Snippets can I add?

With WPCode, you can add any type of code snippet that you would otherwise add in your theme’s functions.php file or in a site-specific plugin.

This includes custom PHP snippets, JavaScript snippets, HTML snippet, Text Snippets, Conversion pixels, Tracking scripts, AdSense or other banner ads code, and more.

What are some example plugins WPCode can replace?

WPCode comes with a ready-made code snippets library that allows you to replace several popular plugins including:

  • Disable Comment plugins
  • Disable XML-RPC plugins
  • Disable Rest API plugins
  • Disable Gutenberg plugins
  • Classic Editor plugin
  • Allow SVG File Upload plugins
  • Disable RSS feed plugins
  • Disable Search plugins
  • Disable Automatic Updates plugins
  • Disable Admin Bar plugins
  • Disable Widget Blocks plugin
  • Classic Widgets plugin
  • Remove WordPress Version Number plugins
  • Google Analytics plugins
  • Facebook Pixel plugins
  • Google AdSense plugins
  • Custom Post Types UI plugins
  • Other WordPress Generator plugins

… and basically any plugin that adds a functionality which can be added via custom code snippets.

Is WPCode translation ready?

Yes, WPCode has full translation and localization support via the insert-headers-and-footers textdomain. Based on your site language, required .mo and .po translation files will be downloaded and placed into the default WordPress languages directory.


14 Shtator, 2022
I just discovered this plugin after using "Code Snippets" for a long time. The plugin makes a great impression. The only thing missing is the possibility to create CSS files, like the custom-css-js plugin does. So not the CSS code in the <head> but a real file. The cherry on top would be a SASS Pre-Processor.... 🙂
14 Shtator, 2022
Hi, After installing WPCode - Insert Headers, Footers, and Code Snippets I cannot edit code snippets. Whenever I click on code snippets to add snippets, page redirect to error page saying "Sorry, you are not allowed to access this page." I'm the admin of my wordpress. I can only add code to header & footer but can not add php,html or js snippets. My issue was mentioned above. Now my issue is resolved. Thanks to everyone who commented and helped to resolve my issue. I found the plugin is great. Before I used to have two plugins, one for header and footer and another for page snippet. This plugin helped me to bring those two works in one. In this plugin we can insert .php, .js, header & footer. So I can insert many code with only one plugin. I don't have to use separate plugin for each. I don't have pro version of this plugin. Is there CSS in this plugin? If that contains in pro version, this plugin is wonderful. I will definitely buy.
2 Shtator, 2022
The best plugin to add headers, footers, and snippets. I have installed in all of my websites with no issues.
Lexojini krejt 923 shqyrtimet

Kontribues & Zhvillues

“WPCode – Insert Headers and Footers + Custom Code Snippets – WordPress Code Manager” është software me burim të hapur. Në këtë shtojcë kanë dhënë ndihmesë personat vijues.


“WPCode – Insert Headers and Footers + Custom Code Snippets – WordPress Code Manager” është përkthyer në 25 gjuhë. Faleminderit përkthyesve për ndihmesën e tyre.

Përkthejeni “WPCode – Insert Headers and Footers + Custom Code Snippets – WordPress Code Manager” në gjuhën tuaj.

Ju intereson zhvillimi?

Shfletoni kodin, shkarkoni depon SVN, ose pajtohuni përmes RSS-je te regjistri i zhvillimeve.

Shënime ndryshimesh


  • Tweak: Snippets used as shortcodes will no longer be executed if they are inactive.
  • Fix: Conditional logic rules for homepage were not working correctly in all scenarios.
  • Fix: Improved auto-insert location matching to avoid snippets not loading in some setups.
  • Fix: We improved the importer tools to avoid unslashing certain types of PHP code.


  • Tweak: Auto-insert is now the default option when creating a new snippet.
  • Tweak: We updated the way we add custom capabilities to improve a scenario where the plugin needed to be reactivated.
  • Fix: We updated the way PHP code is saved to improve support for backslashes.
  • Fix: We tweaked the Page URL rules that were not matching in some cases.


  • New: Insert Headers and Footers is now WPCode – We make it easy for you to add code snippets in WordPress without having to edit your theme’s functions.php file.
  • New: Full Code Snippets Library – WordPress code snippets library right inside the WPCode plugin.
  • New: WordPress code generators to help you quickly generate ready-to-use code using the latest WordPress coding standards and APIs.
  • New: Conditional Logic for Code Snippets – Instead of learning the various WordPress conditional logic queries, you can use our beginner-friendly conditional logic user interface.
  • New: Auto-insert in various locations of your site or manual code output using shortcodes.


  • Fix: Reverted a method visibility that was conflicting with other plugins using it.


  • Tested compatibility with WordPress 5.9


  • Ndreqje: Shfaqje CTA rregullimesh vetëm përdoruesve që janë në gjendje të vizitojnë faqen e rregullimeve.
  • Thellim: Përmirësim i përdorimit të faqes së rregullimeve, lidhur me instalime WordPress të përshtatura thellësisht.


  • E re: Për theksim sintakse, përpunuesit e kodit tani përdorin CodeMirror.


  • U testua përputhshmëria me WordPress 5.4.2


  • U testua përputhshmëria me WordPress 5.3.2
  • Shtim mbulimi për shtypje programthesh mu pas elementit hapës të lëndës, duke përdorur veprimin wp_body_open action


  • U testua përputhshmëria me WordPress 5.2
  • Updated text-domain standards and in plugin header


  • Përditësim PBR-rash
  • Sjellje për herë të parë e tre filtrave të rinj: disable_ihaf, disable_ihaf_footer, disable_ihaf_header


  • Pastrime kodi


  • Ndreqje për përdorues që xhirojnë version PHP-je më të ulët se 5.5


  • Testuar me WordPress 4.7.2
  • u bënë pastrime në kod


  • Testuar me WordPress 4.3
  • Ndreqje: përdorim i plugin_dir_path() dhe plugin_dir_url() për mbulim Shumësajtëshi / lidhjesh simbolike


  • U ndreq: URL steme widget-i pulti, kur prurja RSS s’ngarkohet dot
  • Ndreqje: mbulim për WordPress 4.0
  • U shtua: Kartelë përkthimi POT


  • U përmirësua UI e rregullimeve, për WordPress 3.8+
  • U kalua në pasuesin versioni minimum i domosdoshëm


  • u ndreq kartela Readme


  • u bënë pastrime në kod


  • u ndreq ngarkim i panevojshëm CSS-je


  • Versioni fillestar