Best Premium and Free WordPress Themes › Forums › SuperNewsPro › Using third party system in Header Advertisement
- This topic has 5 replies, 2 voices, and was last updated 6 years, 4 months ago by
acmesupports.
- AuthorPosts
- September 13, 2016 at 11:24 am #8714
Per Johansson
ParticipantIs it possible to use a third party advertisement plugin using shortcodes, for example Advanced Advertising System, in the header advertisement?
September 13, 2016 at 3:43 pm #8716acmesupports
ModeratorHello 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 SupportsSeptember 13, 2016 at 4:13 pm #8718Per Johansson
ParticipantThank 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.pngSeptember 13, 2016 at 4:46 pm #8719acmesupports
ModeratorIf so, you can customize the theme.
You will find the codes for header advertisement onacmethemes/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
September 13, 2016 at 6:44 pm #8728Per Johansson
ParticipantThank 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.
September 14, 2016 at 2:24 am #8737acmesupports
ModeratorWe 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 - AuthorPosts
- The topic ‘Using third party system in Header Advertisement’ is closed to new replies.