- This topic has 9 replies, 2 voices, and was last updated 7 years, 6 months ago by Andrew Misplon.
- AuthorPosts
- June 28, 2017 at 6:32 am #7141
katjaParticipantHi,
I would like to change the site title h1 to something else.
Now the html in header.php is:
<div class="site-branding"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php ultra_display_logo(); ?></a></div>
This produces outcome:
<div class="site-branding"> <a href="https://mysite.com/" rel="home"><h1 class="site-title">My Site Title</h1> </a></div>
So the h1 appears from somewhere. I want to have my outcome for example like this:
<div class="site-branding"> <a href="https://mysite.com/" rel="home"><div class="site-title">My Site Title</div> </a></div>
What should I do? Thank you in advance!
June 28, 2017 at 6:58 am #7142
Andrew MisplonKeymasterThanks for posting. The way I’d go about this is:
1. Plugins > Add New, install and activate Code Snippets plugin.
2. Go to Snippets > Add New, name as you’d like, in the snippet body insert the following: https://pastebin.com/w8xWdUCZ. Go to that link to get the function.
3. Once the function has been inserted, enable option to Only run on site front-end and then click Save changes and activate.
4. Finally, go to Customize > Additional CSS and insert:.site-header .site-branding h2.site-title { display: block; font-size: 36.00002px; font-size: 2.57143rem; font-family: "Muli", sans-serif; font-weight: 300; letter-spacing: -1px; line-height: normal; margin: 0; transition: 0.3s; zoom: 1; }
Hope that helps. I haven’t edited the logo function yet so once inserted into Code Snippets, please, change the h1 tag to h2.
June 28, 2017 at 8:40 am #7143
katjaParticipantThanks Andrew, did all this, but no change. The h1 tag is still there.
(Also I did clear all caches.)June 28, 2017 at 9:14 am #7144
Andrew MisplonKeymasterA common mistake is to save the code snippet but not activate it. You can do that. Check that the snippet is saved and activated. Also that it’s set to run everywhere OR run on the front-end.
June 28, 2017 at 9:27 am #7145
katjaParticipantπ – as I said I did all the things you told. It’s activated and it’s run on frontend. Plus I also cleared all the caches. Nothing changed. For some reason it looks like the snippet is not active or it just doesn’t do anything in my case.
June 28, 2017 at 9:30 am #7146
Andrew MisplonKeymasterFor sure, I did read your reply. I was just going through the common steps users miss when using Code Snippets plugin for the first time. Please, send me a screenshot of the entire snippet plus the bottom section which shows the save and display options. Thanks.
(Easiest way would be to upload to a cloud site like Dropbox or Drive and send the link to the image. Thanks.)
June 28, 2017 at 9:34 am #7147
katjaParticipantJune 28, 2017 at 9:37 am #7148
Andrew MisplonKeymasterThanks π
Sorry if you missed my instruction to change the snippet. You’ll need to edit the
h1
tag and change it toh2
.I havenβt edited the logo function yet so once inserted into Code Snippets, please, change the h1 tag to h2.
Otherwise everything looks great. Also, don’t forget to insert the Custom CSS so that your new
h2
tag has styling associated with it.June 28, 2017 at 9:41 am #7149
katjaParticipantAaaaa- there the h1 is! I didn’t understand this, now it’s working! Thank you very much! π
June 28, 2017 at 9:42 am #7150
Andrew MisplonKeymasterAwesome π Really glad to hear that helped. Thanks for hanging in there.
All the best.
- AuthorPosts
You must be logged in to reply to this topic.