When we are developing wordpress theme, we often need wordpress home, theme and plugin url. In this tutorial, we will introduce how to get these urls for you.
Get wordpress home url
<?php echo get_bloginfo('url'); ?>
The home url likes: https://www.tutorialexample.com
You also can use home_url() function to get wordpress home url.
Get wordpress theme url
<?php echo get_bloginfo('template_directory'); ?>
The theme url likes: https://www.tutorialexample.com/wp-content/themes/iconic-one
Get wordpress plugin url
<?php echo plugins_url(); ?>
The wordpress plugin url likes: https://www.tutorialexample.com/wp-content/plugins