Do you have a blog on the WordPress platform? Do you often talk about programming or include code? Today we will see how to insert and display code in your blog posts easily and quickly with the help of an excellent plugin.
Many times on our blog it is necessary to include a small piece of code to share it with our readers.
Whether you do it recurrently or sporadically, it is necessary to have a plugin like the one we will see today.
And the reasons for doing so are no small thing, appearance and avoiding mistakes are just a couple of them.
Many times when trying to include certain code, errors occur in WordPress caused by this fragment of code that we want to share.
In the end we ended up sharing this code in an external link or in an image, which is not good for our blog.
Another reason for having a plugin to insert and display code on our WordPress blog is that it simply doesn’t look good if we paste it as is into our content.
The code blends in with the text of your article and does not stand out. By including a code in your blog it should stand out from the rest of your content.
For these and many more reasons it is important to have a plugin to insert and display code like the one we will see below.
Embed and display code on your blog with Enlighter
Enlighter is a WordPress plugin that allows us to easily highlight code in our blog posts.
The final appearance of the highlighted code is excellent and integrates correctly with the editor, we just paste the code and the plugin takes care of the rest.
It should be noted that this plugin works for the vast majority of programming languages such as: JavaScript, C, C++, C#, CSS, Go, HTML, Java, JSON, PHP, Python, Rubi, SQL, Swift, VB, etc.
It also incorporates two modes, including code on the same line or in a block, which is great.
It has themes where we can choose the color combination that we like the most or that best suits the style of our blog.
Sounds great doesn’t it?
Install the Enlighter plugin
The first thing we have to do is download it from its WordPress page or look for it in the Plugins -> Add new section.
We install and activate it to be able to use it.
To insert and display code in an entry on our blog, we simply go to the toolbar of our editor and find the option.
We press the first button and paste the code that we want to include in our entry.
Of course, first we place the cursor where we want the code to be included.
On the screen that appears we choose the programming language that we are trying to include and the way in which we want to include it.
We paste the programming code that we want to highlight and press OK.
The code will look like this in our editor:
Later, when viewing the preview or publishing the article, the code will look like this:
Great isn’t it? As you can see, it looks pretty good and stands out from the content.
As I told you before, we can customize the colors and styles by easily changing the theme.
Remember that at Intelplanet we have WordPress hosting plans to take your Internet project to the next level, free domain, 30-day guarantee, free SSL and first-level support.
If this information on how to insert and display code in my WordPress blog posts has been useful to you, do not forget to share it on your social networks and leave us a comment in the section below if you have any questions related to today’s topic, it will be a pleasure to help you.