Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #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!

    #282940

    Hey 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!
    Peter

    #283190

    Appreciate 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 18

    Line 18 is this line: $logo.= “<div class=’custom_content’></div>”;

    Any suggestions?
    Thanks!

    #283195

    Hi!

    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!
    Yigit

    #283297

    Perfect! That works great.

    This thread can be closed.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Add image to header’ is closed to new replies.