Master Addons
  • Widgets
    • Changelogs
      Source Code NEW PRO
      Caldera Forms
      Logo Slider
      Table of Contents
      Gravity Forms
      Transforms PRO
      Restrict Content PRO
      Pricing Table
      Ninja Form
      Mailchimp
      Tooltip
      Popup Trigger NEW PRO
      Which Element NEW
      Creative Button
      Creative Links NEW
      Domain Search HOT PRO
      Dual Heading HOT
      Flipbox
      Animated Gradient BG HOT PRO
      Image Hotspot PRO
      Infobox
      News Ticker PRO
      Particles
      Progress Bar
      Off-Canvas Content NEW PRO
      Reading Progress Bar HOT
      Custom JS
      Blockquote
      Counter Up
      Image Hover Effects
      Reveal NEW PRO
      Rellax PRO
      Positioning
      Image Comparison
      Tabs
      Toggle Content HOT PRO
      Post/Page Duplicator FREE
      Floating Effects PRO
      Mega Menu HOT
      Custom CSS HOT
      Gradient Headline
      Advanced Image
      Nav Menu
      Tooltips
      Comparison Table PRO
      Glassmorphism
      Featured Product PRO
      Image Carousel
      Gallery Slider NEW PRO
      Dynamic Tags NEW
      Countdown Timer
      Current Time
      Patterns
      Wrapper Link
      Timeline
      Team Member
      Contact Form 7
      Advanced Accordion
      Animated Headlines
      Blog
      Business Hours
      Call To Action
      Progress Bars
      Background Slider
      Team Slider
      Dynamic Table
      Grid Line PRO
      WP Forms
      Search
      We Form
      Entrance Animation NEW PRO
      Display Conditions PRO
      Filterable Image Gallery
      WP Forms
      Custom Breakpoints NEW
  • Features
    • Theme Builder

      Design site-wide templates for a consistent look across every page of your website.

      Popup Builder

      Create engaging popups, modals, and announcement bars - to capture leads.

      Widget Builder

      Expand Elementor with advanced custom widgets to build more dynamic layouts.

      Mega Menu Builder

      Create multi-column menus with icons and images for superior navigation.

      Custom Css

      Apply your own CSS for pixel-perfect styling beyond default design options.

      Dynamic Tags

      Insert dynamic content like post titles and custom fields directly into designs.

      Display Conditions

      Control element visibility based on user role, device, time, and other rules.

      Icons Library

      Choose from thousands of built-in icons to enhance visuals and consistency.

      Animation

      Add scroll, hover, entrance, and much more animations to bring designs to life.
  • Template Kits
    • Template Kits

      Professionally designed full-page template Kit. Import and customize in seconds.

      Ready Sections

      Pre-built content sections and rows. Drag, drop, and customize instantly.

      Ready Popups

      Different types of High-converting popup designs. Import and launch quickly.

      Elementor Page Templates

      Complete page layouts for any purpose. Start editing immediately.

      Ready Header

      Multiple modern header designs. Import and adapt to your brand.

      Ready Footer

      Fully designed footers for different websites. Add functionality and style in clicks.
  • Brands
    • WP Adminify

      WP Adminify

      Take control of your WordPress dashboard. Customize the admin experience.
      Admin Bar Editor

      Admin Bar Editor

      Customize the WordPress admin bar for a cleaner, more personalized workspace.
      Loginfy

      Loginfy

      Customize your WordPress login page with branding, styles, and security enhancements.

      Rolemaster Suite

      Manage user roles and permissions with precision for better security and workflow.
      Master Blocks

      Master Blocks

      Expand the Gutenberg editor with advanced custom blocks for more creative layouts.
      WP Spotlight

      WP Spotlight

      Instantly search and access admin features, posts, and settings from anywhere.
  • Themes
  • Help
    • Get Support
    • Documentation
    • Facebook Community
    • Changelogs
  • Blog
Pricing
🇺🇸EN
  • 🇺🇸EN
  • 🇸🇦AR
  • 🇧🇩BN
  • 🇩🇰DA
  • 🇩🇪DE
  • 🇪🇸ES
  • 🇫🇷FR
  • 🇮🇳HI
  • 🇰🇷KO
  • 🇵🇹PT
  • 🇷🇺RU
  • 🇨🇳ZH

Getting Started

  • Can’t see the Master Addon Element inside Elementor Page editor?
  • How To Apply For an Affiliate Account?
  • Active Pro version
  • Installing Plugin

Addons

  • Popup Trigger Widget Settings
  • Off-Canvas Content Widget Settings
  • Logo Slider Widget Settings
  • Progress Bars Widget Settings
  • Image Carousel Settings
  • Featured Product Widget Settings
  • Comparison Table Widget Settings
  • Source Code Widget Settings
  • Advanced Image Widget Settings
  • Gradient Headline Widget Settings
  • Gallery Slider Settings
  • Toggle Content Widget Settings
  • Info Box Widget Settings
  • Timeline Widget Settings
  • Dynamic Table Widget Settings
  • Mailchimp Widget Settings
  • Blockquote Widget Settings
  • Changelog Widget Settings
  • Countdown Timer Widget Settings
  • Current Time Widget Settings
  • Search Widget Settings
  • Filterable Image Gallery
  • Team Slider Widget Settings
  • Counter Up Widget Settings
  • Restrict Content Settings
  • Table of Contents Widget Settings
  • Image Hotspot Widget Settings
  • Image Comparison Widget Settings
  • News Ticker Widget Settings
  • Image Hover Effects
  • Tabs Settings
  • Pricing Table Widget Settings
  • Nav Menu Widget Settings
  • Domain Search Widget Settings
  • Flipbox Widget Settings
  • Tooltip Settings
  • Creative Links Widget Settings
  • Business Hours Widget Settings
  • Contact Form 7 Widget Settings
  • Creative Button Widget Settings
  • Animated Headlines Settings
  • Advanced Accordion Widget Settings
  • Call to Action Widget Settings
  • Progress Bar Widget Settings
  • Blog Posts Widget Settings
  • Team Member Widget Settings
  • Dual Heading Settings

Extensions

  • Mega Menu Settings
  • Which Element Extension Settings
  • Post/Page Duplicator Extension Settings
  • Grid Line Extension Settings
  • Glassmorphism Extension Settings
  • Tooltip Extension Settings
  • Wrapper Link Settings
  • Floating Effects Extension Settings
  • Dynamic Tags Settings
  • Display Conditions Extension Settings
  • Entrance Animation Settings
  • Custom Breakpoints Settings
  • Animated Gradient BG Extension Settings
  • Reveal Extension Settings
  • Particles Extension Settings
  • Background Slider Extension Settings
  • Transforms Extension Settings
  • Rellax Extension Settings
  • Positioning Extension Settings
  • Custom CSS Settings

Widget Builder

  • Conditions
  • Twig Syntax
  • Settings Panel Introduction
  • Divider
  • Text Shadow
  • Select2
  • Border
  • Heading
  • Tabs
  • Repeater
  • Visual Choice
  • Background
  • Dimensions
  • Box Shadow
  • Slider
  • Icons
  • Gallery
  • Media
  • Popover Toggle
  • URL Field
  • Date Time
  • Typography
  • Font
  • Color Field
  • Choose
  • Select
  • Switcher
  • Hidden
  • Code
  • WYSIWYG
  • Textarea Field
  • Number
  • Text Field

Theme Builder

  • Comment Form
  • 404
  • Search
  • Archive
  • Single
  • Footer
  • Header

Popup Builder

  • How to Open a Popup After Inactivity in Elementor
  • How to Show an Exit Intent Popup in Elementor
  • How to Open a Popup on Scroll to a Specific Element in Elementor
  • How to Open a Popup on Scroll in Elementor
  • How to Open a Popup on Click in Elementor
  • How to open a popup on page load?
  • Popup Settings & Options

Template Kit

  • How to Import Template Kits in Master Addons
  • How to Disable Elementor Default Fonts and Colors
  • Import Elementor Template Kits
View Categories
  • Home
  • Docs
  • Addons
  • Source Code Widget Settings

Source Code Widget Settings

Roy Jemee
Updated on September 15, 2026

6 min read

Paste code into a normal text widget and it strips the formatting, leaving an unreadable block. The Source Code widget, a Pro widget in Master Addons for Elementor, fixes that: it shows your code with proper syntax highlighting, line numbers, a language theme, and a copy button, so readers can grab a snippet with one click.

It is built for tutorials, documentation, and developer blogs, anywhere you need to show PHP, JavaScript, CSS, HTML, or another language cleanly. You paste the code, pick a language and theme, and set the copy button, all from the Elementor panel. Below is a run through every setting.

What the Source Code widget does #

The widget takes a block of code and renders it with color-coded syntax highlighting based on the language you choose. It can number the lines, apply one of several editor themes, and add a copy-to-clipboard button that confirms when the code has been copied.

It has three tabs: Content for the code, language, and copy button, Style for the container and button look, and Advanced for the usual Elementor options.

Before you start #

  • WordPress with Elementor installed and active.
  • Master Addons Pro installed with an active license, since Source Code is a Pro widget. New to the plugin? See the installation guide.
  • The code snippet you want to display.

How to add the Source Code widget #

In the Elementor editor, open the Elements panel and search for Source Code, or scroll to the Master Addons section. Drag it onto your page. It loads with a sample snippet so you can see the highlighting right away.

Add your code and pick a language #

Open the Content tab. The Source Code section holds everything. Paste your snippet into the Source Code box, then set the language and theme above it.

Source Code Content tab with the Code language dropdown, Theme dropdown, and source code field
  • Code: the language to highlight, one of 75, such as PHP, JavaScript, CSS, or HTML. This sets how the colors are applied.
  • Theme: the color scheme for the block (covered below).
  • Source Code: the snippet itself, with a Write with AI option if you need a quick example.

Choose a theme #

The Theme dropdown sets the color scheme of the code block. It includes Default, Dark, Funky, Okaidia, Twilight, Coy, Solarized light, Tomorrow, and a Custom option, so you can match the block to a light or dark page.

Source Code Theme dropdown open, listing Default, Dark, Funky, Okaidia, Twilight, Coy, Solarized light, Tomorrow, and Custom

Switching the language and theme together gives each snippet the right look. Here is a JavaScript snippet on the Dark theme.

Source Code widget showing a JavaScript snippet with the Dark theme applied

Set up the copy button #

The copy button is what makes the widget useful for tutorials. Below the code box are the controls for it.

  • Enable Copy Button: show or hide the copy-to-clipboard button.
  • Enable Line Number: turn the line numbers on the left on or off.
  • Button Visibility: show the button Always or only on hover.
  • Button Position: place it in a corner, like the top right.
  • Copy Button Text and After Copied Button Text: the label before and after a copy, such as Copy code and Copied.

When a visitor clicks the button, the label switches to your After Copied text to confirm the copy worked.

Source Code copy button showing the Copied confirmation state after a click

Style the code block #

The Style tab is split into Container and Button, plus Patterns when the free Patterns extension is switched on. The Container section controls the code block’s frame.

Source Code Style tab Container section with height, padding, margin, border type, and border radius
  • Height: cap the block height and let long code scroll.
  • Padding and Margin: spacing inside and around the block.
  • Border Type and Border Radius: the outline and rounded corners.
  • Custom theme only: background, typography, text color, and line number color. Custom shows the code in one color, without keyword highlighting.

The Button section styles the copy button: its typography, text color, background color, padding, border, and radius. There are no separate hover colors.

The result on the page #

Publish or preview and the code renders highlighted, with line numbers and a working copy button. Below is a CSS snippet on the Dark theme with the button showing its Copied state.

Finished Master Addons source code block on the live page, a CSS snippet on a dark theme with a Copied button

Common use cases #

  • Tutorials and how-to posts sharing code readers can copy.
  • Plugin and theme documentation with config or hook examples.
  • Developer blogs showing snippets in PHP, JavaScript, or CSS.
  • Knowledge bases with copy-paste commands.
  • Landing pages demonstrating an API call or embed code.

Tips for working with the Source Code widget #

  • Match the language to the code. The right Code setting is what makes the highlighting accurate.
  • Pick a theme that fits the page. Use a dark theme on dark sections and a light one on white pages.
  • Keep the copy button visible. Set Button Visibility to Always for tutorials so readers spot it.
  • Cap the height for long snippets. A fixed Height with scroll keeps a long block from taking over the page.
  • Write clear button labels. Copy code and Copied tell readers exactly what happened.

Frequently Asked Questions #

What is the Source Code widget in Master Addons?

It is a Master Addons Pro widget for Elementor that displays code with syntax highlighting, line numbers, a language theme, and a copy-to-clipboard button. You paste a snippet, choose the language and theme, and set the copy button, all from the Elementor panel, with no plugins or shortcodes needed.

Which programming languages does it highlight?

You pick one of 75 languages in the Code dropdown, including PHP, JavaScript, CSS, HTML, Python, SQL, and YAML. The choice sets how the syntax colors are applied, so the snippet reads the way it would in a code editor.

Can readers copy the code with one click?

Yes. Turn on Enable Copy Button and a copy-to-clipboard button appears on the block. You set its position, when it shows, and the text before and after a copy, such as Copy code and Copied, which confirms the click worked.

Can I show line numbers in the code block?

Yes. The Enable Line Number toggle in the Content tab adds numbers down the left side of the block. They make it easy to reference a specific line in a tutorial, and you can turn them off for a cleaner look.

Can I change the color theme of the code?

Yes. The Theme dropdown offers Default, Dark, Funky, Okaidia, Twilight, Coy, Solarized light, Tomorrow, and Custom. Pick one to match a light or dark page, or use Custom to set your own background and text colors in the Style tab. Custom shows code in one color, without keyword highlighting.

Wrapping up #

The Source Code widget turns a raw snippet into a clean, highlighted block that readers can copy in one click. Paste your code, set the language and theme, switch on line numbers and the copy button, then style the container to match your page. For a comparison with Elementor Pro’s Code Highlight widget, see the Elementor code block widget page. For another way to present structured content, see the Dynamic Table widget, browse the full Master Addons widgets and extensions, and check the pricing page for what each plan includes.

What are your Feelings

Share This Article :

  • Facebook
  • X
  • LinkedIn
  • Pinterest
Still stuck? How can we help?

How can we help?

Updated on September 15, 2026
Comparison Table Widget SettingsAdvanced Image Widget Settings
Table of Contents
  • What the Source Code widget does
  • Before you start
  • How to add the Source Code widget
  • Add your code and pick a language
  • Choose a theme
  • Set up the copy button
  • Style the code block
  • The result on the page
  • Common use cases
  • Tips for working with the Source Code widget
  • Frequently Asked Questions
    • What is the Source Code widget in Master Addons?
    • Which programming languages does it highlight?
    • Can readers copy the code with one click?
    • Can I show line numbers in the code block?
    • Can I change the color theme of the code?
  • Wrapping up

Join 30,000+ Web Creators Who Trust Master Addons

Get all the premium widgets and templates you desire, built with clean code that keeps your site fast. Ditch the bloat, not the features.

Try Live Demo
Join The Community
Master Addons for Elementor
Master Addons Logo

80+ Premium Widgets & Lifetime Updates – Build Beyond Limits. An Exclusive Creation by Pixar Labs

Facebook-f Twitter Youtube Wordpress
Features
  • Template kits
  • Template Library
  • Widget Builder
  • Theme Builder
  • Mega Menu Builder
Support
  • Support Forum
  • Contact US
  • Join Community
  • Blog
  • Video Reviews
Resources
  • My Account
  • Changlogs
  • Documentation
  • Video Tutorials
  • Toolz.dev
Navigate
  • Apply for Affiliate
  • Terms of Use
  • Refund Policy
  • Privacy Policy
  • About Us