Showing posts with label adding code. Show all posts
Showing posts with label adding code. Show all posts

Friday, February 5, 2010

Editing the HTML in the Blogger Template

Bookmark and Share

NOTE: For information on editing and creating your blog using the Blogger in Draft, and the new Template Designer, please see this OTHER (newer) post!

Here we are, on the last step of the basic editing process for your blogger. This option can be found in your Layout section under "Edit HTML", and it looks like this when you get to the page:

The first thing you want to do is backup your template, so click the "Download Full Template" link and save it. If you are using a basic blogger template and haven't made any customized changes to the HTML then you probably don't need to do this, but it's a good habit to get into.

You will also want to backup your blog itself, so go to the Settings Tab and Select Basic. Right at the top is an option to export or import a blog. Select the Export option and save the blog on your hard drive. If anything goes wrong when you edit the html of your template you now have the data in your blog (the blog backup) and the original data from your template (the template backup) so you can restore your blog.

Editing the HTML is really not such a good idea if you don't have any experience at all with coding or html - blog templates contain CSS codes too, and if you aren't familiar with this, making a change in one place of the CSS can horribly affect something else, or can have no affect at all, because something needs changed elsewhere within the template.

Since the instructions I am giving are for total newbies (ie: people with no blogging or website editing experience) covering this sort of html change would take much more than a few simple instructions.

What I will show you is how to add things like the verification code for webmaster tools, or google analytics, or third party statcounters.

It's usually fairly simple since they actually give you the code and instruct you where to place it. The verification code goes in the head section of the template (see the blue text below), and you can also edit your blog description in the meta content (see the orange text), as well as adding additional keywords (see the red text). These are very simple edits, and as long as you keep your additions between the brackets and the quote marks, you should be fine. Note that you can add codes to the html/javascript widgets also and some codes require that they be added at the end of the body section, so be sure to read the instructions for whatever code you are planning to use.

Be careful when adding extra keywords. Keywords should only relate to your blog's content and subject matter. Trying to put keywords here that you think are "highly paying" but have nothing to do with your blog will actually lose you results in the search engine. Keep your keywords to a reasonable number - between 7 and 15 is usually good. Too many and your site could be considered spam, or could be penalized in searches because of keyword stuffing. Sometimes more is not better. The same can be said of the description field - don't make this too long, and make sure it describes your blog and it's contents.


The last thing you'll notice in the code above is one I added for a favicon - that's the little picture that displays beside the url of your blog in your browser's search bar - for standard blogger blogs, it's usually Blogger's white "B" in the orange square, but you can have your own if you want.

The first thing you need to is create the icon file. If you don't do image or graphic stuff at all, you could just do a web search for free icons, and find one you like that matches your blog, but they aren't hard to create. Many free image software programs can create an icon file from a picture. You will need to crop and resize your image file to 32 X 32 pixels, so make sure whatever you choose can actually be seen and recognized at that size. Then you need to save the file with a .ico extension, so make sure your editing software can do that.

You need to upload that file somewhere that you can link to it - photobucket, imagecave, your own web server, or even a picasa album.

Insert the code for the icon file into the html of your template (see the green code). Where the example shows this url reference:

http : //photographyofgrace.com/ favicon2.ico

You need to remove that (unless of course you plan to use my favico) and replace it with the url to your own favicon file. The balance of the code remains the same.

If you look around the internet, you'll find other easy tweaks you add into the head section of your template's html - things that can help with SEO for instance.

If you really want to edit the design portion of your template, the wisest thing to do is download the template and play around with it in an editor (try NVu or AlleyCode - they're both free). Once you have something you like, you can upload it (after backing up everything) using the "Upload a template from a file on your hard drive" option on the Edit Html page.

That's also how you upload any free template you might find on the web.

That pretty much concludes the basic editing for blogs, and getting started with Blogger.


Remember the blog we first started off with? Well, it's had some changes over the course of this little series, and now it's finished and ready for someone to blog their heart out (have a look):

Friday, September 11, 2009

Getting Started with AdSense and Blogger

Bookmark and Share

Everyday on the Google AdSense forums you'll see lots of questions about using AdSense with Blogger blogs. Today's post will help you get started using AdSense on Blogger. More complex questions will come later, and of course you can always post a specific question to the comments, or use Google's AdSense Help Forum.

1. Can I use AdSense with Blogger?
  • yes, Blogger blogs accept AdSense code very easily.

2. What's the best way to sign up with my blog?
  • Blogger has a "monetize" link which many people use to get an AdSense account, and currently, if you try to apply for adsense without using this monetize link, you'll get rejected for "domain ownership issues.
  • Adsense does not accept "subdomains" for their applications, so signing up at the Adsense home page with a blogger URL will get your application rejected because a blogger URL is a subdomain. To avoid that, you need to apply using the monetize link.
  • Using the monetize link in blogger lets Adsense know that this is a blogger URL, which is acceptable to use for Adsense, so please do not try to sign up at the Adsense homepage for your blog.
3. My Adsense account for my blog was approved. How do I add the code to my blogger?
4. Why don't all of my ads show up on my blogger? I have all the code, but you can't see all the ads.
  • The main reason for this is that you probably have too many of the same kind of ad on one page.
  • AdSense only allows for 3 ad units, 3 link units and 2 AdSense for search boxes on one page.
  • When you choose to have the AdSense ads display below each post, the number of posts allowed to display on a page has something to do with this problem. Many people leave the "posts per page" set at the default, wich I think is 5. That means there may already be three ads on the page (one ad after every 2nd post). What happens is that any other ads of the same type you put on your page won't display.
  • There are two ways to remedy this. Set your post count per page to 1, 2 or 3 posts per page. This will result in one or two ads being displayed leaving you one ad of the same type for another spot. Or you can change the add type. You can use ad units between your posts, and ad links in your sidebar, or vice versa. This allows you to display 3 ads between your posts, and 3 ads in your sidebar (or below your header if you choose).
5. How much does it cost to use Blogger and AdSense?
  • Nothing. Google provides both services freely. If anyone asks you pay anything for a Blogger blog or an AdSense account, then you are in the wrong place.
  • There are many websites on the internet that ask you for money in exchange for providing information about earning money with AdSense, and they trade on the Google name, but they aren't associated with Google, and their practice is not condoned by Google.
  • Information about AdSense or Blogger is available freely from their respective home pages at Google. You should never pay for something that is offered free. Any payments you might make to these other sites go to them, not to Google and Google cannot help you get your money back, nor will they refund you something they didn't charge you for.