• bylto

    (@bylto)


    I currently use a plugin for my archives. It’s called ‘extended live archives’. This means it is a Page and controlled by the ‘Page’ template and not archive.php.

    What I want to do is put adsense code on my archived posts but obviously don’t want this to appear on my ‘contact’ page and ‘about’ page etc. Is there any way I can add this code but exclude it from appearing on certain Pages?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Brad

    (@cre8tive)

    if you are familiar with creating page templates, you can simply create a separate page for your contact and about page that does not have the adense on them at all.

    to simply execute this plan, and if you have FTP acess, access your wp-content/themes folder and – depending on your current theme – look for your default page template that you have added your adsense code to. copy this file twice and rename the files to contact.php and about.php (respectively).

    edit the lines at top of page template (look for “Template Name:” and give it something more descriptive so when you access your admin page, and change out the template, it will display what you have named them – causes less confusion. in both new “contact” and “about” pages remove the adsense code.

    i hope i have given you enough info to work with, and i apologize if i left something out. there might an easier way to this, but this is something that i would do if i was going about this.

    Thread Starter bylto

    (@bylto)

    Hey that’s great info cre8tive! Thanks very much. When I do this have I to go into ‘manage Pages’, select contact for example and change the ‘Page Template’ to the one I just created?

    Thanks again!

    Brad

    (@cre8tive)

    Bylto – yeah, from my experience, what you have said will work for you. i have actually done this same procedure in my desire to alter som page features and make some display only specific information.

    But YES, you will need to go into “Manage pages” and select the desired template – that is why I referenced the action to change the template name so you know what template you are selecting from the “Page Templates” – otherwise, you will jsut confused cause you will not know what template is which.

    Thread Starter bylto

    (@bylto)

    Brilliant info! Thanks very much mate.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to exclude Adsense code from certain Pages’ is closed to new replies.