GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   How to add a banner ad to specific pages wordpress?? (https://gfy.com/showthread.php?t=1122346)

nexcom28 09-29-2013 02:33 PM

How to add a banner ad to specific pages wordpress??
 
Ok,

So I want to add a banner to a wordpress page like this

mysite.com/tag/blue-shoes

or

mysite.com/category/shoes

How can I do this. Add an ad / html to any given page on wordpress?

Thanks

mikesouth 09-29-2013 02:57 PM

simple ad manager plugin will do it right out of the box and its free

OneHungLo 09-29-2013 03:49 PM

http://wordpress.org/plugins/widget-context/

gracesfall 09-29-2013 03:54 PM

If you want something simple, without needing an ad management plugin, do this:

1. If you want the ad in your sidebar, go to Appearance > Widgets and set up a Text Widget with the appropriate code and save.

2. If you want the ad in spots OTHER than your sidebar:

Open up the appropriate template file (e.g. page.php, single.php, etc...) and in the spot you want the banner to be, use code like this:

For page.php:

Code:

<?php if ( is_page(PAGE ID# GOES HERE) ) {?>
<a href="SPONSOR URL" target="_blank"><img src="PATH TO IMAGE" border="0"></a>
<?php } ?>

For category.php:

Code:

<?php if ( is_category(CATEGORY ID# GOES HERE) ) {?>
<a href="SPONSOR URL" target="_blank"><img src="PATH TO IMAGE" border="0"></a>
<?php } ?>

For index.php (if you have Latest Posts as your home page):

Code:

<?php if ( is_home() ) {?>
<a href="SPONSOR URL" target="_blank"><img src="PATH TO IMAGE" border="0"></a>
<?php } ?>

If you're looking for a full on ad management plugin though, I recommend Simple Ads Manager. It's a freebie, fairly light weight, and very full featured.

Hope this helps!

Cyndi

nexcom28 09-29-2013 11:46 PM

Thanks for this code but I am looking for something more advanced. I want to add an ad using iframe or whatever. I want to be able to use a different add on each category / tags page.

I tried using simple ads manager plugin but I can't see anyway to specify which tags / category pages I want to place ads on.

Manfap 09-30-2013 07:50 AM

Quote:

Originally Posted by nexcom28 (Post 19816582)
Thanks for this code but I am looking for something more advanced. I want to add an ad using iframe or whatever. I want to be able to use a different add on each category / tags page.

I tried using simple ads manager plugin but I can't see anyway to specify which tags / category pages I want to place ads on.

The code you were given above does that.

replace the a href tags with the flash iframe.

put your categoryid number in the code where it says, or page id.

need help finding out what your cat id is?
http://wordpress.org/support/topic/h...et-category-id


All times are GMT -7. The time now is 11:30 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc