简体   繁体   中英

Wordpress replacing bloginfo with home_url?

In my header file, I'm using Wordpress function bloginfo following three times:

<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />

But the theme check plugin gives me following warning:

bloginfo(url) was found in the file header.php. Use echo home_url() instead.

Can someone tell me how can I replace the that? I couldn't find any information in the function references on Wordpress website.

It may be not in your header.php .

find on all your active theme files any reference to:

bloginfo('url');

and replace it with:

echo home_url();

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM