A Beginner’s Guide to Get WordPress Home, Theme and Plugin URL – WordPress Tutorial

By | September 19, 2019

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

echo get_bloginfo('url');

The home url likes: https://www.tutorialexample.com

You also can use home_url() function to get wordpress home url.

Understand WordPress home_url() for Beginngers – WordPress Tutorial

Get wordpress theme url

echo get_bloginfo('template_directory');

The theme url likes: https://www.tutorialexample.com/wp-content/themes/iconic-one

Get wordpress plugin url

echo plugins_url();

The wordpress plugin url likes: https://www.tutorialexample.com/wp-content/plugins

Leave a Reply

Your email address will not be published. Required fields are marked *