PDA

View Full Version : Pasting ads into a Wordpress blog?


Lydia123
11-16-2007, 09:33 PM
I've got a link on my site to my Wordpress blog, which is on my BlueHost space, just like my website. I installed Wordpress via Fantastico, if it makes a difference. How do I paste my Google ads into the blog? Don't I need to see the Wordpress page as HTML to c/p the ads in, same as I do the website? But I don't see where that option is. T

And along those lines, how do I c/p my Sitemeter into the blog, also?

Thx for any advice.

Basil
11-16-2007, 10:11 PM
10 best wordpress plugins for google adsense (http://www.quickonlinetips.com/archives/2006/11/10-best-wordpress-plugins-for-google-adsense/)

If you don't know which one to go with just get this (http://www.acmetech.com/blog/2005/07/26/adsense-deluxe-wordpress-plugin/).

Typically you edit them directly into the theme, although a plugin may be easier to work with and modify.

felgall
11-16-2007, 10:50 PM
You could just paste the code directly into the spots you want in the theme. Where the plugins that Basil suggests have an advantage is that they allow you to define all your ads to the plugin and then insert them into the code (including blog posts) using a single tag. The plugins also attempt to make sure that if you do use them in blog posts that they stay within the number of occurrences that Google permit to be displayed on the same page. I use the plugin that Basil recommends on my blog so I will second his recommendation.

Lydia123
11-17-2007, 11:31 AM
Thanks for the links. I have read the plug-in instructions carefully, but as always, am still confused, lol. I actually prefer just c/ping the ads in manually because I don't want to "manage" them. I just want to post a leaderboard or similar block ONCE, vertically, on the right-hand side where all the irrelevant "stuff" is (like the Meta title and all the junk under it) and forget about it. Is this reasonable? Are ads something I'm supposed to "manage?" Doesn't Google randomly change them every so often once I've pasted them in?

Anyhow, how do I get to the Wordpress theme to copy an ad into it? All I can find from the tab at the top of the Wordpress Manager is a place where I can click to change the theme, but not one to open it and insert code. Where do I look for this?

Thx again for all the help. :)

felgall
11-17-2007, 12:33 PM
"Presentation" tab on the main toolbar.

"Theme Editor" on the sub-toolbar.

Then select which template file to edit from the list on the right.


The biggest advantage in using an ad manager plugin is that most likely you will want to insert the same ad block into 3 or four different templates that are used for different pages (home page, individual articles, archive, search etc). With an ad manager you insert a reference to the ad in each instead of the ad code itself and then if you decide to change the colours of the ad you change it in one place instead of 3 or 4.

Lydia123
11-17-2007, 03:49 PM
Thanks, felgall, that was very helpful, I was able to get my Sitemeter installed. Another question: I want to replace the Search bar that is presently in the sidebar with a Google search bar. So can I just go into the sidebar editing menu, erase the searchbar line and replace it with all the Google code? And if I inadvertently erase what I'm not supposed to, or otherwise mess up the Wordpress code, have I messed up my whole blog?

Basil
11-17-2007, 05:07 PM
You could just copy the original text from whatever you're editing and save it to a file on your computer somewhere, so if you break something you can just copy it back. Also, rather than just erase something you can <!-- comment --> it out, so that you can go back and change it if it's not what you wanted to do.

felgall
11-17-2007, 05:08 PM
If you want something other than the default sidebar then the easiest way to set it up is to drag all the widgets you want into the sidebar in the order you wan them to appear. There are also options for creating multiples of the same widget (for those with a number on the end). If you want your sidebar to include custom code such as the Google searchbar then use the Text widget to incorporate the code you want.

You can always reorganise the sidebar at any time by dragging the widgets into a different order or dragging them on and off the sidebar.

Lydia123
11-17-2007, 05:24 PM
<< You could just copy the original text from whatever you're editing and save it to a file on your computer somewhere, so if you break something you can just copy it back. Also, rather than just erase something you can <!-- comment --> it out, so that you can go back and change it if it's not what you wanted to do. >>


Great idea, Basil, and I will do that! But what do you mean by this:

<!-- comment -->

What do I do with that? Do I paste that left bracket, exclamation mark and two dashes in front of what I want to get rid of, leaving the content there, and close it with the two dashes and the right bracket?

Is there any way to preview what is done in Wordpress before saving it?

Lydia123
11-17-2007, 05:26 PM
<< If you want something other than the default sidebar then the easiest way to set it up is to drag all the widgets you want into the sidebar in the order you wan them to appear. There are also options for creating multiples of the same widget (for those with a number on the end). If you want your sidebar to include custom code such as the Google searchbar then use the Text widget to incorporate the code you want. >>

Ok, you have lost me here. :) What do you mean drag all the widgets -are you referring to the code for ads and the searchbar as widgets? Otherwise, what is a widget? What is the Text widget?

Ah, n/m again ...got it! Great advice, thanks!

Basil
11-17-2007, 05:36 PM
Do I paste that left bracket, exclamation mark and two dashes in front of what I want to get rid of, leaving the content there, and close it with the two dashes and the right bracket?
Yes, however you can't have a "-->" anywhere inside of the comment because it'll end it, which means you can't put another comment inside of it or it will end prematurely. I'm not sure why you can't nest comments, this is only an issue if you try to comment out a block that already has a comment inside of it.

That's an HTML comment mind you, if you want to comment out CSS you need to use this sort of /* comment */.

Is there any way to preview what is done in Wordpress before saving it?
I know you can preview posts and pages, I don't think you can preview theme changes before setting them.

Lydia123
11-17-2007, 05:43 PM
Thanks! Ok you guys, I got the widgets and the sidebar figured out, can you help me w/ the abbreviated HTML question I had in the other thread? :) Putting the Google searchbox has apparently ruined my HTML code by removing most of it so I can't add the ads ...yet, curiously enough, the pages show up the same as they always did! Can you shed some light on that?

Lydia123
11-17-2007, 05:52 PM
I spoke too soon ...I didn't get the widgets figured out. I dragged the ones I wanted into the default sidebar, pasted my Google search box text in a text widget, saved, and it ruined my page. The sidebar showed up empty and it messed up the body of the page, too. I hate this stuff. :( Thank goodness when I removed all the widgets, it defaulted back to normal. Wonder what I did wrong? Is it that cursed Google search box?

felgall
11-17-2007, 05:54 PM
As soon as you drag one or more widgets to the sidebar the default sidebar is replaced with the widgets you specify.

If you have an HTML error in the content of a text widget then it can mess up the rest of the page.

Try setting up all the widgets you want one at a time and check the way the page looks in between. That way if adding a widget messes up the page you will know which one it is.

Basil
11-17-2007, 05:57 PM
Is there a link somewhere I could see this abbreviated html?

I wouldn't recommend using frontpage. It's been replaced by microsoft expression.

If you're just messing with code I would use a text editor with syntax highlighting, I personally use crimson editor.