How to display the site name in a WordPress template open

How to display the site name in a WordPress template

Approved. Code works!
This is exactly the working code that is verified by the moderator or site administrators
1

In the place where you want to display the name of the site, this is usually the header.php file. Add to the right place function below:


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

Use the function to display a link to the main page:

<?php esc_url(home_url()) ?>

Display the name of the site with a link:

<a href="<?php esc_url(home_url()) ?>"><h1><?php echo esc_html(bloginfo('name')); ?></h1></a>
0

More

Comments (1)

Leave a Reply

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

How many?: 22 + 22

lil-code© | 2022 - 2024
Go Top
Authorization
*
*
Registration
*
*
*
*
Password generation