This page redirects to an external site: https://developer.wordpress.org/reference/functions/get_bloginfo/
Languages: English • 日本語 Português do Brasil • Türkçe • Русский • (Add your language)
Returns information about your site which can then be used elsewhere in your PHP code. This function, as well as bloginfo(), can also be used to display your site information anywhere within a template file.
<?php $bloginfo = get_bloginfo( $show, $filter ); ?>
wp-includes/version.php.The default usage assigns your blog's title to the variable $blog_title.
<?php $blog_title = get_bloginfo(); ?>
This example assign your blog's title to the variable $blog_title. This returns the same result as the default usage.
<?php $blog_title = get_bloginfo('name'); ?>
Using this example:
<?php echo 'Your Blog Tagline is: ' . get_bloginfo ( 'description' ); ?><br />
results in this being displayed on your blog:
Your Blog Tagline is: All things WordPress
Using this example, you can obtain the name and description for the network home:
<?php switch_to_blog(1); $site_title = get_bloginfo( 'name' ); $site_url = network_site_url( '/' ); $site_description = get_bloginfo( 'description' ); restore_current_blog(); echo 'The Network Home URL is: ' . $site_url; echo 'The Network Home Name is: ' . $site_title; echo 'The Network Home Tagline is: ' . $site_description; ?>
results in this being displayed on your blog:
The Network Home URL is: http://example.com/ The Network Home Name is: Example The Network Home Tagline is: The example site
Returns template directory URL to the active theme.
From version 2.7. On host example, the Blog address (URL) is shown at http://www.example.com/home, and the WordPress address (URL) is installed at http://www.example.com/home/wp.
Note that directory URLs are missing trailing slashes.
admin_email = [email protected] atom_url = http://www.example.com/home/feed/atom charset = UTF-8 comments_atom_url = http://www.example.com/home/comments/feed/atom comments_rss2_url = http://www.example.com/home/comments/feed description = Just another WordPress blog home = http://www.example.com/home (DEPRECATED! use url option instead) html_type = text/html language = en-US name = Testpilot pingback_url = http://www.example.com/home/wp/xmlrpc.php rdf_url = http://www.example.com/home/feed/rdf rss2_url = http://www.example.com/home/feed rss_url = http://www.example.com/home/feed/rss siteurl = http://www.example.com/home (DEPRECATED! use url option instead) stylesheet_directory = http://www.example.com/home/wp/wp-content/themes/largo stylesheet_url = http://www.example.com/home/wp/wp-content/themes/largo/style.css template_directory = http://www.example.com/home/wp/wp-content/themes/largo template_url = http://www.example.com/home/wp/wp-content/themes/largo text_direction = ltr url = http://www.example.com/home version = 3.5 wpurl = http://www.example.com/home/wp
Since: 0.71
get_bloginfo() is located in wp-includes/general-template.php.
Theme paths: get_template(), get_template_directory(), get_template_directory_uri(), get_theme_roots(), get_theme_root(), get_theme_root_uri(), get_stylesheet(), get_stylesheet_uri(), get_stylesheet_directory(), get_stylesheet_directory_uri(), get_bloginfo(), get_theme_file_uri(), get_theme_file_path()