Ad King Pro
[resolved] Ad not displaying (5 posts)

  1. footmark
    Posted 2 years ago #

    I have created an ad with Advert Type 'Homepage' and one image ad.

    In the homepage template I have created a div called 'homepage-ads' which appears OK on the screen.

    In the div I put the following code:

    <?php if (function_exists('adkingpro_func')) do_shortcode("[adkingpro type="Homepage"]"); ?>

    On refreshing the page I get a blank screen.

    I try again with <?php if (function_exists('adkingpro_func')) do_shortcode("[adkingpro type=Homepage]"); ?>

    i.e. removing the quotes from around "Homepage".

    This time the page displays, but the advert does not.

    What am I doing wrong please?


  2. Ash Durham
    Plugin Author

    Posted 2 years ago #

    Hi footmark,

    Sorry, I believe I have supplied incorrect instructions there for the template insert. Can you give the following a try?

    <?php if (function_exists('adkingpro_func')) echo do_shortcode("[adkingpro type='Homepage']") ?>

    I believe the first example of code you had errored due to the double quotes wrapping the shortcode aswell as being inside the shortcode.

    Let me know how that goes.



  3. footmark
    Posted 2 years ago #


    Perfect! That's cracked it!

    Many thanks for your speedy help.

    You might want to revise the notes on the web page!


  4. Ash Durham
    Plugin Author

    Posted 2 years ago #

    Hey Richard,

    Great to hear and I will definitely be amending that little piece of information.

    Amazing what a little word like echo can cause such a headache ;)

    Thanks again!

  5. gg2000
    Posted 1 year ago #

    Hi Ash , I can't believe how long I have been trying to get this to work for, but just saw this thread and it worked! thanks so much! I was getting the same problem because of the quotes as Footmark.
    anyway it's sorted now.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Ad King Pro
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.