-
AuthorPosts
-
March 1, 2014 at 3:42 pm #231077March 2, 2014 at 1:49 am #231146
Hey deyowulf!
Can you please post a screenshot of what you’re trying to do? You can select the logo size before you click the “Insert image as logo” or use css to constrain the width and height.
Best regards,
IsmaelMarch 2, 2014 at 3:01 am #231161Hi Ismael,
I picked full size when I inserted the image as my logo. When testing with GTMetrix it states that it is missing width and height attributes :
https://www.dropbox.com/s/dlk3isxvl004m1a/Screenshot%202014-03-02%2009.08.27.png
So I guess I need to insert the width and height attributes code somewhere, but I’m not sure exactly where to do this.
March 3, 2014 at 5:02 pm #231632Hi!
Please go to wp-content\themes\enfold\framework\php folder and open function-set-avia-frontend.php file and find
src='{$logo}' alt='{$alt}' />";
and change it to
src='{$logo}' alt='{$alt}' width='900' height='100' />";
and adjust as needed
Best regards,
YigitMarch 4, 2014 at 5:35 am #232021Can I create a new function-set-avia-frontend.php in my child theme and to the change like that or do I need to edit the original file?
March 4, 2014 at 7:54 am #232044Hi!
You can copy the whole function code on your child theme’s function.php. I think YIgit is referring to the avia_logo function:
if(!function_exists('avia_logo')) { /** * return the logo of the theme. if a logo was uploaded and set at the backend options panel display it * otherwise display the logo file linked in the css file for the .bg-logo class * @return string the logo + url */ function avia_logo($use_image = "", $sub = "", $headline_type = "h1") { $use_image = apply_filters('avf_logo', $use_image); $headline_type = apply_filters('avf_logo_headline', $headline_type); $sub = apply_filters('avf_logo_subtext', $sub); $alt = apply_filters('avf_logo_alt', get_bloginfo('name')); $link = apply_filters('avf_logo_link', home_url('/')); if($sub) $sub = "<span class='subtext'>$sub</span>"; if($logo = avia_get_option('logo')) { $logo = "<img src='{$logo}' alt='{$alt}' />"; $logo = "<$headline_type class='logo'><a href='".$link."'>".$logo."$sub</a></$headline_type>"; } else { $logo = get_bloginfo('name'); if($use_image) $logo = "<img src='{$use_image}' alt='{$alt}' title='{$logo}'/>"; $logo = "<$headline_type class='logo bg-logo'><a href='".$link."'>".$logo."$sub</a></$headline_type>"; } return $logo; } }
Regards,
IsmaelMarch 4, 2014 at 9:28 am #232096Thanks that worked Ismael :)
-
AuthorPosts
- The topic ‘Specify Logo Image Dimensions’ is closed to new replies.