This last method is perhaps the simplest of all: All you have to do for this third method is search for a plugin on WordPress.org that lets you add custom code snippets directly on your site.
Using a plugin that provides this functionality is a great way to go about adding snippets for the following reasons:
- Using a plugin means that any code you add will not be tied to the site’s theme—so you won’t have to add the code back after each theme update like in the second method above.
- It’s a great way to save time compared to the first method above, in which you create your own plugin to do the job.
- You get to add code from right within your site’s wp-admin!