
-
AuthorPosts
-
June 24, 2014 at 6:32 am #282822
Followed the instructions on this post: https://kriesi.at/support/topic/adding-468-x-60-banner-to-header/
Added the following to functions.php
function after_head_image_func(){
echo “<div class=’custom_content’></div>”;
}
add_action(‘ava_main_header’, ‘after_head_image_func’);Which worked great, but didn’t quite do what I hoped.
Staging site is at http://monitash.com/
Trying to get the image to output into the same container as the logo. Screenshot: https://www.evernote.com/shard/s123/sh/a800feed-4a6b-48a6-8d08-6fa185a7ad84/804db30c034e80c92253de27ec20a41e
I’m guessing that I need to use a different action, but not sure what. Any suggestions?
BTW – I already left a glowing review and this is the first theme I recommend to all my clients, but THANK YOU for doing such a fantastic job! The control panel, documentation, and support area are so great, I haven’t needed any assistance until now. Thanks again!
June 24, 2014 at 11:35 am #282940Hey mnmatt!
You can try to use the avf_logo_final_output filter instead – it enables you to add the image directly before or after the logo container. Use the filter like:
function av_change_logo($logo, $use_image, $headline_type, $sub, $alt, $link){ $logo .= "<div class='custom_content'><img src="http://monitash.com/wp-content/uploads/OrganizingAngel2.png"></div>"; return $logo; } add_filter('avf_logo_final_output', 'av_change_logo', 100, 6);
Cheers!
PeterJune 24, 2014 at 7:03 pm #283190Appreciate the fast response!
Unfortunately I get the following error:
Parse error: syntax error, unexpected T_STRING in /home/content/13/10537213/html/monitash/wp-content/themes/enfold-child/functions.php on line 18Line 18 is this line: $logo.= “<div class=’custom_content’>
</div>”;
Any suggestions?
Thanks!June 24, 2014 at 7:24 pm #283195Hi!
Please replace Peter’s code with following one
`function av_change_logo($logo, $use_image, $headline_type, $sub, $alt, $link){ $logo .= "<div class='custom_content'><img src='https://monitash.com/wp-content/uploads/OrganizingAngel2.png' /></div>"; return $logo; } add_filter('avf_logo_final_output', 'av_change_logo', 100, 6); `
Simply change double quotes to single ones around img tag
Cheers!
YigitJune 24, 2014 at 11:21 pm #283297Perfect! That works great.
This thread can be closed.
-
AuthorPosts
- The topic ‘Add image to header’ is closed to new replies.