For beautiful design of codes – html, java, css, php – some WordPress plugins available in the official repository are used. Using them, you can highlight the necessary elements, display line numbers, etc.
SyntaxHighlighter Evolved
It is convenient to insert html code into WordPress using the SyntaxHighlighter Evolved plugin. The application is widely used and has powerful functionality and is popular among graphic design email list webmasters.
SyntaxHighlighter Evolved
The settings allow you to display codes beautifully and correctly, highlighting them in different colors, numbering lines, making links clickable and giving the codes a readable appearance. The program is equipped with a visual preview of the output, if necessary, it will decipher the attributes used and can do much more.
Having activated the plugin, we mark our preferences in the “Settings”. The application is in English, but now there is also a Russifier.
With its help, it is easy to insert HTML code into WordPress content; we allow the program in the settings to process the <pre> tag or use the corresponding shortcodes:
[php]example[/php]
[html]example[/html]
[css]example[/css]
[codelang="js"]example[/code]
Code Prettify
A simple plugin with a small weight, does not require configuration. Using it, you can insert html code into WordPress, using automatic code highlighting, regardless of the programming language, adds your own styles to the <pre> or <code> tags.
Code Prettify
Downloaded from Google library or added to the site via script connection tag. For lovers of simple solutions it is simply irreplaceable.
Read also!
"Cheat Sheet for Setting Up 301 Redirects"
Read more
How to insert html code into Joomla site
When building and configuring a Joomla 3-based site, the master faces the need to insert third-party codes – php, JavaScript or html. Let's consider how to insert the html code of the LiveInternet visitor counter into a module or article on Joomla.
To implement the required code, we will use a plugin for code processing that works directly with sites on the Joomla engine – Sourcerer. With its help, you can add any common code, be it html code or css, php, javascript, to any sector – to the article body, to a category, meta tag, component, module, etc.
Insert html code on Joomla
Please note that the free version of the application has limited functionality, but all the main functions are not affected.
After downloading the plugin, install it. Sequence of actions:
In the administrative section, find the “Extensions” section and go to the “Extension Manager” tab.
Without changing the preset setting “Download package file”, click on the option “Select file”.
In the saved files, find the archive with the program and open it.
Download and install the plugin.
Once the process is complete, the system will notify you that the module has been successfully installed.
The plugin does not require any special settings, the optimal parameters are already set by default. Now you can insert the html code on the selected page.
How to insert code into a website using a module
In the "Admin Extensions" section, use the "Module Manager". Using the corresponding button, create a new module. From the proposed options on the "Select Module Type" tab, find the HTML code and click on the link.
Selecting a module type
In the new module, fill in the “Header” window, enter the opening and closing tags {source} and {/source}, all that remains is to paste the copied HTML code between the tags.
Insert code into the site using the module
Next, in the standard fields of the module, we specify our settings: display the title/or not, select the location of the module and complete the work by clicking the “Published” and “Save” buttons.
We check whether the new module works by going to the desired page of the site.
How to insert code into an article in Joomla editor
The workflow is identical to inserting code into a module. After installing the Sourcerer application, we write the {source}{/source} tags in the material editor and place the required code between them.
Handy Code Insertion Plugins for WordPress
-
- Posts: 415
- Joined: Tue Jan 07, 2025 4:20 am