Web Hosting Talk







View Full Version : Wordpress Question


aqaz69
09-09-2008, 10:17 PM
Hi all,

I have a quick question, really need an answer:

I have a wordpress blog and I placed my adsense ads on it by inserting the code into the sidebar.php.

However, I would only like these to appear on some pages such as the index and archives. On other pages I would like these to be replaced with my Neverblue ads (still in the sidbar).

How can I do this? What line of code I must add??

PLEASE AND THANKS!!! :)

teachforjune-Scott
09-09-2008, 10:56 PM
The easiest way to do that is to create two sidebars and create two specific page templates for main and archives that call the adsense sidebars and the regular default template for the neverblue ads.

The only other way to do this is with wordpress conditional statements ie ishome, etc.

aqaz69
09-10-2008, 08:53 AM
I am too much of a noob to know how to create another sidebar template :(

I used a template that i downloaded and modified!

Do you know where I could find more on these conditional statements, or will that be even more confusing to me?!

Thanks

teachforjune-Scott
09-10-2008, 09:07 AM
If you don't understand php and how wordpress works, then both of these techniques are going to be beyond newbie capabilities. You can read more about wordpress and the conditional statements and how to make templates on wordpress.org. You can also search online for some wordpress tutorials. There are really some good one's out there.

But what you're asking for isn't just a simple code replacement. The simplest way is to make custom templates, and assign those to certain pages.