Assets Folder

All the images and SVGs should go into corresponding subdirectories of the assets folder.

Assets folder theme redone WordPress | WebRedone

The 2 reasons why you should always keep theme-related assets in this folder are:

  1. Consistency
  2. Because of a useful utility function tr_get_media, that we can use to easily display images/SVGs on our pages.

Quick example of the tr_get_media function

{tr_get_media('logo.svg', true)}

In this example, tr_get_media will asynchronously get an SVG from the assets/svg/ directory. If we omit the “true” as the second argument, it will just print the SVG synchronously.
Read more about tr_get_media and other utility functions that you can use on the Theme Functions page.

Join Our Newsletter

To get updates about Theme Redone