Take advantage of jQuery included in WordPress • WordPress Help

If you use the latest versions of WordPress you will already have noticed that when you choose the editor button to upload an image the screen goes dark and shows you in the foreground the file loading window. Well, that's jQuery and Thickbox included in the installation of WordPress.

So why not use it instead of installing a plugin? type lightbox with which to show larger images without leaving the page?

The process is simpler than you imagine. The first thing is to configure the options of Objects in the admin panel, in this way you can define the size of the thumbnails of the images, you put it to your liking.
 jquery-wp1 "title =" jquery-wp1 "width =" 500 "height =" 223 "class =" alignnone size-medium wp-image-5506 "srcset =" https://ayudawp.com/wp-content/uploads/2009/07/jquery- wp1-500x223.png 500w, https://ayudawp.com/wp-content/uploads/2009/07/jquery-wp1.png 767w "sizes =" (max-width: 500px) 100vw, 500px "/> </a> </p>
<p> Now we have to modify the file <code> header.php </code> of our theme, adding, just before <code/> the following: </p>
<p> It is possible that already the first and last line already have them in the file header.php, in that case simply add the other 3 in between </p>
<p> And we have the infrastructure Now, when we upload an image in our posts, if we want to take advantage of <strong> jQuery </strong> and <strong> ] Thickbox </strong> included simplem We will do the following: </p>
<p> That's it, now when you click on the image our readers will already have that nice pop-up effect that will show the whole image without leaving the page. </p>
	</div><!-- .entry-content -->

	<footer class= modeerPosted on Categories Experto, jQuery, Thickbox, Tutoriales / Trucos, WordPress.orgLeave a comment on Take advantage of jQuery included in WordPress • WordPress Help