Automatically change wp-caption link

[ad_1]

I'm making a site with a lot of images, and currently the way wp-caption is rendering is

<a href="image url"><img src="thumbnail"></a>Caption

Is there some JS or PHP to change it so it automatically renders as:

<a href="image url"><img src="thumbnail">Caption</a>

So that way the caption is included in the link?

[ad_2]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer