Tagged: x
-
AuthorPosts
-
August 15, 2016 at 5:34 am #1131678
jensmith3ParticipantHello,
My site is on the temporary url of http://103.37.8.129/~thekidsa/
My client does not want a logo but a full-width banner which I have added. I would like to add some padding to the top of the page site so that it is not flush with the top of the screen.
Also, is it possible to have the tag line (as in Setting > General Settings >Tagline) show below the site title?
Many thanks and kind regards,
Jenny
August 15, 2016 at 6:01 am #1131709
ChristopherModeratorHi there,
Please update your code to :
header.masthead { background-image: url("http://103.37.8.129/~thekidsa/wp-content/uploads/2016/08/TKAbannerNoText.jpg"); width: 100%; max-width: 100%; background-repeat: no-repeat; background-position: center; background-size: cover; margin-top: 10px; }Copy _brand.php from framework/views/global and put it in the same path inside child theme, replace existing code with following :
<?php // ============================================================================= // VIEWS/GLOBAL/_BRAND.PHP // ----------------------------------------------------------------------------- // Outputs the brand. // ============================================================================= $site_name = get_bloginfo( 'name' ); $site_description = get_bloginfo( 'description' ); $logo = x_make_protocol_relative( x_get_option( 'x_logo' ) ); $site_logo = '<img src="' . $logo . '" alt="' . $site_description . '">'; ?> <?php echo ( is_front_page() ) ? '<h1 class="visually-hidden">' . $site_name . '</h1>' : ''; ?> <a href="<?php echo home_url( '/' ); ?>" class="<?php x_brand_class(); ?>" title="<?php echo $site_description; ?>"> <?php echo ( $logo == '' ) ? $site_name : $site_logo; ?> </a> <br> <?php bloginfo('description'); ?>Hope it helps.
August 15, 2016 at 7:22 pm #1132670
jensmith3ParticipantHi there,
Thank you so much. The first part worked perfectly except I had to change margin-top to padding-top to avoid a gap.
The second part partly worked in that I can see the tag line but it runs along side the site title. Is it possible to have it underneath the site title and change the colour to white.
Many thanks and kind regards,
Jenny
August 16, 2016 at 1:49 am #1133076
RupokMemberHi Jenny,
Please update the code a bit first :
<?php // ============================================================================= // VIEWS/GLOBAL/_BRAND.PHP // ----------------------------------------------------------------------------- // Outputs the brand. // ============================================================================= $site_name = get_bloginfo( 'name' ); $site_description = get_bloginfo( 'description' ); $logo = x_make_protocol_relative( x_get_option( 'x_logo' ) ); $site_logo = '<img src="' . $logo . '" alt="' . $site_description . '">'; ?> <?php echo ( is_front_page() ) ? '<h1 class="visually-hidden">' . $site_name . '</h1>' : ''; ?> <a href="<?php echo home_url( '/' ); ?>" class="<?php x_brand_class(); ?>" title="<?php echo $site_description; ?>"> <?php echo ( $logo == '' ) ? $site_name : $site_logo; ?> </a> <p class="site-tagline"<?php bloginfo('description'); ?></p>Then add this under Custom > CSS in the Customizer.
.x-brand { float: none; } .site-tagline { color: #fff; display: block; float: none; margin-left: 5px; margin-top: 5px; position: relative; }Hope this helps.
August 16, 2016 at 2:27 am #1133109
jensmith3ParticipantHi there,
I replaced the code but it didn’t work – it actually showed in the header itself – so I replaced it with the original code.
I did however add the custom css and that has worked except the colour of the text has not change.
Any thoughts?Many thanks and kind regards,
Jenny
August 16, 2016 at 5:38 am #1133291
ChristopherModeratorHi there,
Please add the code we provided in previous replay https://community.theme.co/forums/topic/add-top-padding-to-site-title/#post-1133076
Clear cache and check again.
Thanks.
August 16, 2016 at 5:59 am #1133321
Paul RModeratorHi Jenny,
You may replace this line of code
<?php bloginfo('description'); ?>with this
<p class="site-tagline"><?php bloginfo('description'); ?> </p>Then add this in custom > Edit Global CSS
.site-tagline { color:#fff; }Hope that helps
August 16, 2016 at 6:45 am #1133376
jensmith3ParticipantHello,
I have replaced the line of code as suggested by Paul R and that has worked perfectly. Could I ask one final thing on this; can I reduce the space between the site title and the tag line?
Many thanks again and kind regards,
Jenny
August 16, 2016 at 8:48 am #1133526
ThaiModeratorHi There,
Please add the following CSS:
p.site-tagline { margin-top: -20px; }Hope it helps 🙂
August 16, 2016 at 5:54 pm #1134279
jensmith3ParticipantToo good. Thanks so much.
Kind regards,
Jenny
August 16, 2016 at 11:12 pm #1134654
Prasant RaiModeratorYou are most welcome. 🙂
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1131678 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
