Add syntax highlights in comment in wordpress

If you have some articles in your websites that about coding or programming. If your users want to write code in comment, need the syntax highlights.

In this article, we shoe you how you can add syntax highlights in comment . This adding syntax highlights is for wordpress.

Why you need syntax highlights in comment in wordpress

You cant paste code snippet in your article in word press. If you want to do this, you should use block editor. With this, you can show some code samples and add it in your posts and pages. If your code block is without syntax highlights, it does not have a beautiful appearance and cant help your users.

You know that, the syntax highlights is a kind of format of writing, that show the codes. It contains numbers and colors and help the users easily understand the code.

In below we show some examples of syntax highlights.

You need syntax highlights for display code in your articles. You have to do some thing that your websites users, use syntax highlights in comment. Syntax highlights can make your comment interesting.

In the following we describe the ways to add syntax highlights in comments.

Add syntax highlights in comment

How add syntax highlighter in word press

At first, you should know how to add syntax highlighter in word press. You should use syntax highlighter evolve. This applications easily can help you to add syntax highlights in comment, posts and so on.

At first, install the syntax highlighter evolve plugin. If you want to edit the post, you should click on + option and then add new block and write your syntax highlighter code.

Now, you have a new code block for your posts. When you done all of this, you should go ahead and save your changes. If you go to your websites, you can see the syntax highlights in posts or in your pages in word press.

Add syntax highlights in comment

Add syntax highlights in comments

You have to add syntax highlights in comments with using syntax highlighter evolve. But in comments, the codes should be wrapped in short codes. We have two kinds of codes that need to wrapped. If you want to add PHP codes or HTML codes, you should use these are codes in short codes.

How add syntax highlighting notice in comment

After that you use syntax highlights with short code, you should choose a way to say your users to use syntax highlights with short codes. So, you should add custom code to your site.

The custom codes are simply display a notice. it must be said the is not show the notice of logged for users.

For this, you can log out of the admin area in word press or add a new window in browser and then see all of the posts in your blog. Even if you can easily see all of the syntax highlights notice.

Also you can add custom CSS code. You can read the article about CSS code.

read more:

0 CommentsClose Comments

Leave a comment

subscribe to newsletter

Get the latest posts and articles in your email

We promise not to send spam 

subscribe to newsletter

Get the latest posts and articles in your email

We promise not to send spam 

subscribe to newsletter

Get the latest posts and articles in your email

We promise not to send spam