Elementor and Gutenberg Demo

Use a our advanced Elementor Pro Code Highlight widget to directly embed the source code of any Code Snippet within an Elementor page. Embed your source code of any snippet within a post, page, or any other post type with full syntax highlighting, line numbers, and many other features. Powered by Prism (https://prismjs.com)

Display your Code Snippets anywhere

// Disable Comments completely (ironically, this is a comment too :)

add_action('admin_init', function () {
    // Redirect any user trying to access comments page
    global $pagenow;
    
    if ($pagenow === 'edit-comments.php') {
        wp_redirect(admin_url());
        exit;
    }

    // Remove comments metabox from dashboard
    remove_meta_box('dashboard_recent_comments', 'dashboard', 'normal');

    // Disable support for comments and trackbacks in post types
    foreach (get_post_types() as $post_type) {
        if (post_type_supports($post_type, 'comments')) {
            remove_post_type_support($post_type, 'comments');
            remove_post_type_support($post_type, 'trackbacks');
        }
    }
});

// Close comments on the front-end
add_filter('comments_open', '__return_false', 20, 2);
add_filter('pings_open', '__return_false', 20, 2);

// Hide existing comments
add_filter('comments_array', '__return_empty_array', 10, 2);

// Remove comments page in menu
add_action('admin_menu', function () {
    remove_menu_page('edit-comments.php');
});

// Remove comments links from admin bar
add_action('init', function () {
    if (is_admin_bar_showing()) {
        remove_action('admin_bar_menu', 'wp_admin_bar_comments_menu', 60);
    }
});

Display source code to visitors using an Elementor Widget

A special version of the Elementor Pro Code Highlight widget that allows you to directly embed the source code of any Code Snippet within an Elementor page.

Display source code to visitors through the WordPress block editor (Gutenberg)

Embed the source code of any snippet within a post, page, or any other post type with full syntax highlighting, line numbers, and many other features. Powered by Prism (https://prismjs.com)

Make it easy for your visitors to copy paste your snippets

  • We put no limits on how many Snippets you can store or display. 
  • Choose from a long list of themes.
  • Highlight lines, word wrap, tab size, indent, line numbers and many more options to adjust how things work and look.
  • Style your snippets anyway you want in Elementor*

We use cookies for everything except getting you spammed. You agree to this by looking at anything, clicking on anything, or by the simple act of breathing. Yes, we think these notices are ridiculous too. So sorry we have to bother you with this. We love you, just so you know <3