I have a code like this: <div class="left">© <a href="<?php bloginfo('url'); ?>">="<?php bloginfo('url'); ?></a> | <a href="<?php bloginfo('url'); ?>/sitemap_index.xml">Sitemap</a></div> , and it is showing the following result: C http://domain-name.com | Stemap I am wondering if there is any simple way to get rid of "http://" string using PHP ("inline", without using variables etc, like in some tutorials online) Thank you.
You could use: str_replace('http://', '', bloginfo('url')) Where bloginfo('url') is the string you want to remove the http:// out of. Hope it helps
If you use str_replace, use get_bloginfo instead So it will be like this <div> <?php echo str_replace('http://', '', get_bloginfo('url')); ?> </div> PHP: