Community Forums › Forums › Archived Forums › General Discussion › adding a logo on the left of the site title
Tagged: Logo, site title
- This topic has 11 replies, 3 voices, and was last updated 7 years, 6 months ago by wadams92101.
-
AuthorPosts
-
September 11, 2016 at 12:57 pm #192985TracyMember
I am using the Decor Child Theme and I quite like the look of the site title and tagline however I would like to add a logo to the left of it which would be the same height as the title and tagline combined but about 88px wide. I know this question was answered a couple of times with tutorials which I followed with no luck. I wonder if someone could help me with this. The link to the site is http://shamwari.ca/
thanks so much, appreciate it...
http://shamwari.ca/September 11, 2016 at 8:11 pm #192995Brad DaltonParticipantDid you try this solution http://www.carriedils.com/display-logo-before-site-title/
September 11, 2016 at 8:45 pm #192997TracyMemberYes I did try that tutorial. I ended up with the lg mystery man avatar stacked on top of the title but I couldn't figure out how to adjust it and put my own logo in.
September 11, 2016 at 8:51 pm #192998Brad DaltonParticipantDid you add the CSS? You can also modify the CSS. And, you need to add your logo to the Header via the customizer or the avatar displays.
September 11, 2016 at 8:57 pm #192999TracyMemberyes I added the css and adjusted the logo to the size of my own. I changed the width of the title area in the functions file from 400 to 500. I'll give it all another go. I was also confused with the end of her tutorial speaking of the Genesis Simple Hooks which I have used before but it wasn't doing anything either so I gave up and here we are. Thanks for your replies. I'm going to try it again.
September 11, 2016 at 8:59 pm #193000Brad DaltonParticipantI tested the code and couldn't get it to work in its present form either on the Genesis Sample theme.
What was the other solution you tried?
September 11, 2016 at 9:18 pm #193001TracyMemberI can't find it now... grrr
September 29, 2016 at 2:37 pm #193916wadams92101MemberHi, I'm also interested in this solution. I accomplished it via CSS but it behaves somewhat poorly in responsive mode for a mobile screen. This puts the logo to the left of the tilte. The description remains independent of the logo - in mine it lines up underneath the logo. (added via Simple Custom CSS so it omits the other code in that selector)
.title-area { padding-left: 4rem; background: url("//mydomain.com/wp-content/themes/news-pro/images/Logo.png") left top no-repeat; }
But, I'm thinking that I probably should have done this via php so that it would behave better in responsive mode?
September 30, 2016 at 3:19 am #193936Brad DaltonParticipantOctober 1, 2016 at 12:01 pm #194074wadams92101MemberI have taken another look at it, and I am encouraged by the way it works responsively. However, when I tried it, it seemed to wipe out my style.css customizations.
October 1, 2016 at 12:13 pm #194075TracyMemberI never was able to get this working
October 1, 2016 at 1:21 pm #194078wadams92101MemberI think it might have wiped out my CSS modifications because of something related to do with the fact that I'm not placing the snippet directly into the functions.php file. I'm using the My Custom Functions plugin or Genesis Simple Hooks for the php snippets and the Simple Custom CSS plugin for the CSS modifications. I use these plugins so that my modifications aren't wiped out in minor version updates of the child theme (the irony of child theme updates). Also, it never did show the logo. The code I used was
<?php add_action( 'genesis_header', 'cd_site_image', 5 ); function cd_site_image() { $header_image = get_header_image() ? '<img alt="logo" src="http://mydomain.com/wp-content/themes/news-pro/images/Logo.png" . get_header_image() . '" />' : get_avatar( get_option( 'admin_email' ), 224 ); printf( '<div class="site-image">%s</div>', $header_image ); } ?>
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.