Two common methods you will see mentioned in our tutorials for adding code in Oxygen are Code Snippets and My Custom Functionality.

When do you use which? Is one method better than the other?

Code Snippets is typically used for adding code that does not involve adding directories and files on your server.

My Custom Functionality is typically used when you need to upload assets i.e., images, JavaScript and/or CSS files and enqueue (load) them usually, conditionally.

Whichever method you use, there is no right or wrong here.

Do note that there are some subtleties and adding the same exact code might work in one but not the other. Example.

Personally, I prefer using My Custom Functionality since I am quite comfortable working with code and edit the files using Visual Studio Code or Sublime Text.

Advanced Scripts is another option for you to consider. It is by the same developer behind the popular Hydrogen Pack.

Need help implementing a tutorial in your site or want to hire me for custom work?


Find the article helpful and wish to donate?



You need to be logged in to view and post comments.
Not a member yet? Join here.
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram
%d bloggers like this: