- This topic has 8 replies, 2 voices, and was last updated 5 years ago by Tom.
November 7, 2015 at 8:25 am #151167Allen
I’m new to WordPress. I read some themes will correctly render html tags embedded in the site title. The GeneratePress theme apparently will not. By this I mean, if I insert <sup><small>SM</small><sup> in the site title, I would like to see a small superscripted SM, not the literal string “<sup><small>SM</small><sup>”. One post I saw suggested editing header.php to change bloginfo(‘description’) to echo html_entity_decode(get_bloginfo(‘description’)). GeneratePress doesn’t have this in header.php.
What do I need to do with GeneratePress to get html tags to render correctly in the site title? Thanks.November 7, 2015 at 8:28 am #151170Allen
P.S., I purchased the full set of GeneratePress add-on’s, and maybe GP Hooks would help me do this, but I don’t see any real documentation on this.November 7, 2015 at 8:37 am #151171TomLead DeveloperLead Developer
First you’ll want to go to “Customize > Site Identity” and disable the title and tagline.
Then go to “Appearance > GP Hooks” and add your title and tagline to the “Before Header Content” hook:
<div class="site-branding"> <p class="main-title" itemprop="headline"><a href="YOUR URL" title="YOUR TITLE" rel="home">YOUR TITLE WITH HTML</a></p> <p class="site-description">YOUR TAGLINE IF NECESSARY</p> </div>
That should do it 🙂November 7, 2015 at 8:41 am #151172Allen
Could I also do this with a generate_show_title filter? If so, what menu item on the dashboard allows me to add a filter?November 7, 2015 at 8:43 am #151173TomLead DeveloperLead Developer
The generate_show_title filter is for the content title – it determines whether to show it or not.
The best/easiest way to do have full control over the HTML of your title is using GP Hooks.November 7, 2015 at 8:57 am #151175Allen
The html you gave me only kinda worked. It moved the title out of its padded white area and into an unpadded light blue area. How do I move it into the padded white area?November 7, 2015 at 8:59 am #151176TomLead DeveloperLead DeveloperNovember 7, 2015 at 9:07 am #151182Allen
That was the problem. Now it’s perfect. Thanks!November 7, 2015 at 9:16 am #151183
- You must be logged in to reply to this topic.