Using third party system in Header Advertisement - Acme Themes

Best Premium and Free WordPress Themes Forums SuperNewsPro Using third party system in Header Advertisement

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #8714
    Per Johansson
    Participant

    Is it possible to use a third party advertisement plugin using shortcodes, for example Advanced Advertising System, in the header advertisement?

    #8716
    acmesupports
    Moderator

    Hello Per Johansson,
    Thank You so much for using our theme. We haven’t tested that plugin yet. would you please check once by adding the shortcodes in place of header advertisement code and check it. Hope, the shortcodes will work.

    Warm Regards
    Acme Supports

    #8718
    Per Johansson
    Participant

    Thank you for quick answer.
    Sorry to say it don’t.
    It just displays the shortcode itself, in our case it shows [aas_zone zone_id=”1367″] where the ads should show up.
    I made a screenshot: http://www.amusetidningen.se/wp-content/uploads/2016/09/HeaderAds.png

    #8719
    acmesupports
    Moderator

    If so, you can customize the theme.
    You will find the codes for header advertisement on acmethemes/hooks/header.php and inplace of add codes, use
    <?php do_shortcode(' [aas_zone zone_id=”1367″]'); ?>
    Hope, this will sort our your problem.

    Thank you

    #8728
    Per Johansson
    Participant

    Thank you!
    It took me a while, but i finally got it working.
    I replaced line 325
    echo $supernews_header_main_google_ads;
    with
    echo do_shortcode("$supernews_header_main_google_ads");

    However, due to the nature of the free version of the ad plugin it’s not possible to get it to align right in an easy matter, but that can be solved by placing the ads inside a table. So i actually had to add two more lines to the code, ending with with the following three lines instead of the one i removed.

    echo "<table class=float-right><tr><td>";
    echo do_shortcode("$supernews_header_main_google_ads");
    echo "</td></tr></table>";

    Doing it the way i do now makes it possible to use the admin ui to change the shortcode should the need for it arise.

    Oh, and of course i copied the header.php file and placed in my child-theme.

    #8737
    acmesupports
    Moderator

    We are really happy that you can customize our theme and make it in to your own requirements. Really glad with you. If you have any further query, let us know.

    Warm Regards,
    Acme Supports

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Using third party system in Header Advertisement’ is closed to new replies.