Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

Conditionally put ads on pages

$
0
0

Replies: 0

Hello,

I need to put an adnetwork adcode into page.php. Once I do that, the ad starts displaying on all pages.

Instead, I want to incorporate functionality to NOT display ads on certain page but display on others.

Something like this as shown in below pseudo code.

If page_id != 100 then

display adcode
end if;

How can I achieve this in PHP. Where can I find system parameters like page_id? And how would above code look like in PHP? (sorry I am not a PHP guy).

Thanks,
Darsh


Viewing all articles
Browse latest Browse all 59525

Trending Articles