ad skin only on home page with script code after

Posted in: Newsmag
Post count: 46

Hi team TagDiv,

I’m using a script code to display ads skin (background ads) with an ad network. The problem is that they provide me a script code to insert just after the <body> that i inserted in the header file (header.php).

It works fine, but ads are displaying in every pages and posts and i would like to just display theme on my homepage. I didn’t find the <body> in other files of the theme like single.php…

Is there any solution for me ?

Thank you in advance !

Post count: 6535

Hi

You can use is_front_page() wp function to check when the homepage it’s displayed. Using this function can be made a condition which will display the ad only for homepage, here is an example: http://screencast.com/t/D4k4V3IX

Hope this helps.
Thanks!

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