Jump to content


Photo

How to show top advertisement (Before the Article)

Advertisement Advert Ad Wordpres ATF

  • Please log in to reply
4 replies to this topic

#1 princejindal8

princejindal8

    Newbie

  • Members
  • Pip
  • 3 posts
  • Framework Version:Lite Edition
  • Country: Country Flag

Posted 31 January 2013 - 02:25 PM

Hi

 

I want to show advertisements Above The Fold (ATF) at my website, which is Healthy Celeb (http://healthyceleb.com)

 

The ad would be before the article on every post / page. I was doing this before also, but that was with the help of the plugin called Ad Injection.

 

Now, I want to paste some PHP code also, which can't be done by plugin. The code is

 

<?php
if (class_exists('magiks_geo_shortcode_class'))
{
   echo do_shortcode('[m_geocountry locations="US"] HTML for USA [/m_geocountry] [m_geocountry locations="CA,GB"] HTML for Canada and UK [/m_geocountry] [m_geocountry locations="CA,US,GB" display="0"] HTML for everyone else [/m_geocountry]');
}
?>

 

 

I do not know where to paste this code  in the theme template and in which file. Please help me out.

 



#2 catrina

catrina

    Advocate

  • Members
  • 12345 posts
  • LocationCalifornia
  • Country: Country Flag

Posted 31 January 2013 - 03:42 PM

Are you looking to add this ad on every individual post page only?



#3 princejindal8

princejindal8

    Newbie

  • Members
  • Pip
  • 3 posts
  • Framework Version:Lite Edition
  • Country: Country Flag

Posted 01 February 2013 - 01:44 PM

Yes, I want to add this advert on every page and post of the website.



#4 princejindal8

princejindal8

    Newbie

  • Members
  • Pip
  • 3 posts
  • Framework Version:Lite Edition
  • Country: Country Flag

Posted 01 February 2013 - 06:03 PM

Can I expect a answer from the experts and moderators over here? It would be great if you can help me out.

 

What changes should be done in the code and where the above code should be pasted in the theme to get the banner / advertisement shown before every article / page of the website.

 

I have already installed the plugin for the above code to work.

 

If there is any CSS required, kindly tell me that also.

Thanks in advance


Edited by princejindal8, 01 February 2013 - 06:06 PM.


#5 Simon_P

Simon_P

    Messer

  • Administrators
  • 8388607 posts
  • LocationDevon
  • Framework Version:2.0
  • Country: Country Flag

Posted 01 February 2013 - 06:07 PM

Install the free action map plugin from the store
Then that will show you which 'hook' to use
You will need to use the Wordpress function add_action()





Also tagged with one or more of these keywords: Advertisement, Advert, Ad, Wordpres, ATF