sacredpath
(@sacredpath)
Automattic Happiness Engineer
Are you wanting the content of the span to be visible on your site?
I do – I want to be able to style the span separately in CSS but I can’t figure out how to get it parsed as HTML and not just displayed to the screen.
I can’t find anything that indicates that HTML tags within the <title> tag should be parsed. What are you trying to achieve?
I’d like to style (change the color of, most specifically) one of the words inside my blog title. It seems like that’s got to be possible, right? I was thinking I could just wrap that word in a span tag and then apply a style to the span in CSS but I just get:
The <span id=”accent”>Garrison</span> Show
without the span tag actually being parsed.
I think there may be some confusion in terminology. The <title> tag controls what’s displayed in the browser’s title (or tab) bar. If you’re trying to control how your site title is displayed on the page itself, make a child theme, copy sidebar-index.php from your parent theme to the child theme, and change this line (line 11):
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
to
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">The <span class="garrison">Garrison</span> Show</a></h1>
Wow. Obviously. I knew I missing something huge.
Thank you for the assistance!! Happy New Year!