You're using WPCode Lite. To unlock more features consider upgrading to Pro.

Create Custom Snippet

 NEW!Connect to the WPCode Library to get access to 140 FREE snippets!

  • WooCommerce

Select the code type for your snippet:

HTML Snippet

Easily insert scripts from other sites or build custom elements using HTML.

Text Snippet

Create reusable text snippets that you can visually format in a familiar editor.

Blocks Snippet (PRO)

Use the Block Editor to create components that you can insert anywhere in your site.

CSS Snippet

Write CSS styles directly in WPCode and easily customize how your website looks.

SCSS Snippet (PRO)

Write SCSS styles directly in WPCode and easily customize how your website looks.

JavaScript Snippet

Add custom JavaScript code to your site to add interactivity or integrate with other services.

PHP Snippet

Extend or add functionality using PHP code with full control on where it's executed

Universal Snippet

Start writing HTML and add PHP code like you would in a .php file with Universal snippets.

Insertion Your snippet can be either automatically executed or only used as a shortcode. When using the "Auto Insert" option you can choose the location where your snippet will be placed automatically.

Choose "Auto Insert" if you want the snippet to be automatically executed in one of the locations available. In "Shortcode" mode, the snippet will only be executed where the shortcode is inserted.

Site Wide Header

Use this field to define a custom shortcode name instead of the id-based one.

Use this field to define the attribute name for your shortcode and click Add Attribute. Attributes added here will be available to use as smart tags and as variables inside snippets. E.g. an attribute named "keyword" will be available in a PHP snippet as $keyword. Learn more.
    Click to search for any posts or pages where this shortcode is being used.
    • PHP Snippets Only
    • Site Wide (Frontend)
    • Admin Area
    • Anywhere (CSS Selector) PRO

    If enabled, this snippet will be loaded as a physical file instead of being inserted in the source of the page. Learn more.

    Looking for more scheduling options? Click here to read more about all the available options.
    Device Type

    Limit where you want this snippet to be loaded by device type. By default, snippets are loaded on all devices.

    Smart Conditional Logic Enable logic to add rules and limit where your snippets are inserted automatically. Use multiple groups for different sets of rules.

    Using conditional logic you can limit the pages where you want the snippet to be auto-inserted.

    Code Revisions Easily switch back to a previous version of your snippet.

    As you make changes to your snippet and save, you will get a list of previous versions with all the changes made in each revision. You can compare revisions to the current version or see changes as they have been saved by going through each revision. Any of the revisions can then be restored as needed.


    • AvatarJohn DoeUpdated 1 second agoCompare
    • AvatarJohn DoeUpdated 1 day agoCompare
    • AvatarJohn DoeUpdated 1 week agoCompare
    • AvatarJohn DoeUpdated 2 weeks agoCompare
    • AvatarJohn DoeUpdated 1 month agoCompare
    • AvatarJohn DoeUpdated 2 months agoCompare

    Code Revisions is a Pro Feature

    Upgrade to WPCode Pro today and start tracking revisions and see exactly who, when and which changes were made to your snippet.

    Basic info Tags: Use tags to make it easier to group similar snippets together.
    Priority: A lower priority will result in the snippet being executed before others with a higher priority.
    Note: Add a private note related to this snippet.

      New Notifications (0)

      Notifications (0)