Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #625774

    I am trying to add a banner to the right of the logo

    There are a few threads about doing this but they seem to all suggest different methods.

    I tried adding this code to functions.php (as per one of the threads)

    
    function after_head_image_func(){
    	echo "<div class='custom_content'><a href="http://www.seductiondisco.com" target="_blank"><img src="http://higherphuket.com/wp-content/uploads/2015/11/750x110px-Seduction.jpg" /></div>";
    	
    }
    add_action('ava_after_main_menu', 'after_head_image_func');
    

    But when I update the functions.php file (I’m using enfold child theme on a subdomain to test this btw), I get this error

    Parse error: syntax error, unexpected ‘http’ (T_STRING), expecting ‘,’ or ‘;’ in /home/adminhiph/public_html/demo/wp-content/themes/enfold-child/functions.php on line 9

    Is there some updated method to use with the latest version of Enfold?

    I want to replicate the header style from this site – http://higherphuket.com/ (logo on left, banner on right).

    Thank you!

    • This topic was modified 8 years, 6 months ago by seanchk. Reason: code tags missing
    #625801

    Update.

    I have removed that code and tried the widget in header option.

    I’ve created a widget called Header and added the banner code. I’ve tried all the different CSS suggestions to position my banner but it always appears below the menu.

    It is never ‘in the header’

    This is the CSS I’m using at the moment.

    #Header .widget {
      float: right;
      z-index: 999;
      height: 120px;
      top: -135px;
    }

    Thanks

    #626244

    Hi,

    Please try the following in Quick CSS under Enfold–>General Styling:

    #text-2 {
        position: absolute;
        top: -141px;
        right: 0;
    }
    

    Thanks,
    Rikard

    #626390

    Rikard,

    That is awesome! it worked beautifully.

    Can you please briefly explain how it works?

    What is the relevance of text-2 ?

    I haven’t removed the following code… do I leave that?

    #Header .widget {
      float: right;
      z-index: 999;
      height: 120px;
      top: -135px;
    }

    Once again awesome support! Thanks!

    #626394

    Hi!

    text-2 is the ID of your widget. All widgets have their unique ID’s :)
    Glad Rikard could help! Let us know if you have any other questions or issues

    Best regards,
    Yigit

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Adding banner in the header to the right of the logo’ is closed to new replies.