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 titleecho
: the PHP command used to output the retrieved information
Helpful links
More of Php Wordpress
- How to disable PHP warnings in WordPress?
- How to redirect to another page in WordPress using PHP?
- How to use the WordPress REST API with PHP?
- How to get the site URL in WordPress using PHP?
- How to check the PHP version in WordPress?
- How to send an email using PHP in WordPress?
- How to get the current URL in WordPress using PHP?
- How to use get_header in WordPress using PHP?
- How to create pagination in WordPress using PHP?
- How to increase the upload limit in WordPress using PHP?
See more codes...