Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #225


    I know for a fact that these two functions resolves a url but what is the difference between site_url() and get_theme_file_url() functions in WordPress?


    site_url() points to you rool directory such as in the same directory where wp_content and wp_admin resides

    example: site_url() resolves to

    get_theme_file_uri() points to theme directory of your website and is mostly use to resolves location of CSS and Javascript files

    example: get_theme_file_uri(‘images/pic.jpg’) resolves to

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.