9951 explained code solutions for 126 technologies


php-wordpressHow to use bloginfo in WordPress with PHP?


Bloginfo is a WordPress function that can be used to display information about the current site. It can be used with PHP to retrieve information such as the site title, description, URL, and more.

Example code

<?php echo bloginfo('name'); ?>

Output example

My WordPress Site

Code explanation

  • bloginfo(): the WordPress function used to retrieve information about the current site
  • 'name': the parameter used to retrieve the site title
  • echo: the PHP command used to output the retrieved information

Helpful links

Edit this code on GitHub