If you use a theme that is coded using HTML 5, then it’s a good idea to make sure, that when you insert and image in your post, in the front end, the image is displaying using the

html tag.

The correct syntax for

tag is like this:

alt attribute
image caption

In order to achieve that in your theme, which doesn’t have this feature enable by default is very simple: in your function.php file just add this code:

In the above code, I did enable all the features like search forms, comment form, all the others. You can simply copy and paste this code in your theme functions.php file, unless your theme is doesn’t have it already. Now, when you will insert and image into your post content, the image in your front end will be wrap in the

html tag. Also don’t forget to include the image caption, it’s not necessary, but it’s a good practice.

Share This