-
MaryParticipant
How can I add the code in the span class “site-title-text” second text under it.
Thank you
Daniel TaraKeymasterCan you please further explain what you mean by “second text under it”? If you want to display the site description there, it’s not possible with this theme.
MaryParticipantThank you for answer. I want get this effect.
- This reply was modified 7 years, 11 months ago by Mary.
Daniel TaraKeymasterI’m sorry but I’m at a loss here. What exactly is “text 2” and where is its contents being pulled from? Is it the site description? Is it red and underlined the way you want it styled on your website?
Daniel TaraKeymasterOK, I have thought this through and reached the conclusion that the only text that’s reasonable to display there is the site description. To make it display you will first need to make some changes to the code.
Ideally this should go in your child theme’s functions.php file:
function enlightenment_child_filter_site_branding_args( $args ) { $args['site_description'] = true; $args['site_description_tag'] = 'span'; return $args; } add_filter( 'enlightenment_site_branding_args', 'enlightenment_child_filter_site_branding_args', 21 );
Mind the priority set to
21
, this is important to override a previous filter set by the theme.After you’ve added that code the description will display out of place as evidenced in this screenshot:
To make it display properly you will have to apply a bit of styling. This should go under Theme Options → Design under the “Custom CSS” field:
.site-description { display: none; } @media (min-width: 992px) { .navbar-header { position: relative; } .navbar-large .site-logo { float: left; margin-right: 6px; } .navbar-large .site-title-text { float: left; line-height: 1.3; } .navbar-large .site-description { display: inline-block; position: absolute; top: 46px; left: 72px; font-size: 12px; } }
This should display the description right under the site title:
When scrolling and the navbar is shrinked the site description will be hidden, just like menu item descriptions:
You can edit the site description under Settings → General, the Tagline field.
- This reply was modified 7 years, 11 months ago by Daniel Tara. Reason: Correction to CSS code to avoid displaying site description on mobile devices
You must be logged in to reply to this topic.