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

    Hello!

    In the comments section on Themeforest, you responded to our desperate cry for help ;) regarding putting a banner ad rotate in the header. We absolutely love this theme, we’ve purchased 20+ times and use it for each of our clients!

    This is the one feature that we so desperately need for one of our bigger clients. This is the following code you gave me in the comments to try:

    add_action('ava_after_main_menu','my_banner_rotator');
    
    function my_banner_rotator()
    {
       echo "banner-html";
    }

    This is the code that we need to add to show up in the header to the right of the logo:

    <?php echo adrotate_group(6); ?>
    or
    [adrotate group="6"]

    I have put in a link to an image that shows what the code you gave did (and where it needs to go LOL); when I tried to replace “banner-html” with the shortcode, nothing worked. When I tried it with the php code, it broke so I went in via FTP and removed all of it.

    Any help, suggestions, or direction would be so helpful!

    Thank you!

    #333075

    Hi developerFD1!

    Thank you for using Enfold.

    Please try this:

    add_action('ava_after_main_menu','my_banner_rotator');
    
    function my_banner_rotator() {
    	$output  = "<div class='banner-rotator'>";
    	$output .= do_shortcode('[adrotate group="6"]');
    	$output .= "</div>";
       
        echo $output;
    }

    Use this on Quick CSS or custom.css to adjust the position of the banner.

    .banner-rotator {
    position: absolute;
    bottom: 50px;
    right: 0;
    }
    

    Cheers!
    Ismael

    #333175

    So.. you pretty much just saved my behind! Thank you SO SO much. This worked, and looks great!

    #333183

    One last question – with these ad rotates (like the small ones in the footer) you are able to click on them. Is there a way to get that to work for the header ads we have there? For some reason it isn’t working in the header.

    #333501

    Hey!

    Please add following code to Quick CSS as well to make image clickable

    #header_main_alternate { z-index: 3; }

    Best regards,
    Yigit

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.