Tagged: custom header, logo, site title
-
AuthorPosts
-
December 19, 2014 at 10:18 am #370482
I’d like to have the site title and subtitle (taken from the site settings) in the header, left aligned, site title on top in large font, site subtitle below, in smaller font, and the logo, set in Enfold, right aligned in the header. I did find partial solutions, but not the combination of the two.
Of course I also need to be able to upgrade to future Enfold versions without losing this …
- This topic was modified 9 years, 11 months ago by ocetechnologies.
December 19, 2014 at 7:30 pm #370719Hi ocetechnologies!
Add this to the bottom of your functions.php file.
add_action( 'ava_after_main_menu', 'enfold_customization_add_stuff_to_header' ); function enfold_customization_add_stuff_to_header() { echo '<span class = "site_title">'.get_bloginfo("name").'</span>'; echo '<span class = "site_description">'.get_bloginfo("description").'</span>'; }
And you can use this CSS to style them.
.site_title { } .site_description { }
Best regards,
ElliottDecember 21, 2014 at 2:33 am #371124Ok, Thanks, got it working with the logo on the right and the menu left.
I added this CSS:.site_title {font-size:3em;color:#ccc;position: relative;top:-15px;font-family:'Crimson Text'; } .av-main-nav > li > a { line-height: 190px !important; }
However, when I activate the shrink header on scroll function, I’d like to make the site title a bit smaller, and move the menu up with a certain amount of pixels. How would I do that?
December 21, 2014 at 6:57 am #371200Hi,
Can you post the link to your site please?
Regards,
JosueDecember 21, 2014 at 12:57 pm #371258This reply has been marked as private.December 22, 2014 at 1:32 am #371365Hey!
You can add this at the bottom of Quick CSS:
.header-scrolled .av-main-nav > li > a { line-height: 80px !important; } .header-scrolled h1.site_title { position: absolute; top: 2px; font-size: 20px; }
Cheers!
IsmaelDecember 23, 2014 at 11:03 am #372023Ok thanks!
I have two more questions:
- How do I prevent that when I hover over the site title, the menu item below gets highlighted? I know that happens because of the hight of the A element, but is there a way to prevent that?
- Is there a way to use the site title as an H1 on the homepage only, and as a P on all other pages?
- This reply was modified 9 years, 11 months ago by ocetechnologies.
December 23, 2014 at 4:46 pm #372112Hi!
1- Please add following code to Quick CSS
h1.site_title { z-index: 999!important; }
2- Please change Elliott’s code to following one
add_action( 'ava_after_main_menu', 'enfold_customization_add_stuff_to_header' ); function enfold_customization_add_stuff_to_header() { if (is_home()){ echo '<h1 class = "site_title">'.get_bloginfo("name").'</h1>'; echo '<p class = "site_description">'.get_bloginfo("description").'</p>'; } else{ echo '<p class = "site_title">'.get_bloginfo("name").'</p>'; echo '<p class = "site_description">'.get_bloginfo("description").'</p>'; } }
Cheers!
Yigit -
AuthorPosts
- You must be logged in to reply to this topic.