Renaming "Older" and "Newer" Page Links in Blogger

Two years ago I wrote a post on hiding "Newer"/"Older" pagination links on Blogger and I was recently asked by a reader if it was possible to rename the links name, yes it is, and in this tutorial you are going to learn that the safe way.

Why is it the safe way, is there any side-effects? Not really, but this tutorial takes you into editing a few lines of code in your template so chances are that if you accidentally make any mistakes then the template might just broke and you have to fix that problem first to get your blog running again.





Back-up the Template

As a precautionary step make a backup of the template so that if anything goes wrong you can always revert it back to the current template: How To Backup Your Template

Two Ways To Do It

Before we start take note that we are presenting you two different ways to do this. The first method affects it from the root while the second one is like a layer, it renames it using JavaScript code when the page is loaded.

Difference? The first method internally changes the name to what you like, the JavaScript way is done on the front-end i.e when the page is loaded the text on the pagination links is internally still what it was but the JavaScript code executes and changes the document dynamically on the client-side to change the name.

#1 Method: By Replacing HTML/XML Codes

Note: We assume you are using not using a third-party template. Though this may work with third-party templates too but the naming convention is uncertain for them so we can't be sure if the code we are asking you to search exists in your template or not.

Follow the instructions carefully to rename the "Older" and "Newer" page links.

1. Go to your Blogger Dashboard -> Template -> Click on "Edit HTML" button to open the template code editor


2. Once the template editor opens put your cursor in the code area and then press CTRL+F/CMD+F and look for the following line by entering it in the search box

<b:includable id='nextprev'>

Searching for this line must bring up the matching line of code where we have to make the changes. If there is a triangle arrow on the left of the line in code editor then click on it to show the code inside it.



3. When you click on the triangle right arrow the code inside it will show up and it should be something like or may even be the exact.

<b:includable id='nextprev'>
<div class='blog-pager' id='blog-pager'>
<b:if cond='data:newerPageUrl'>
<span id='blog-pager-newer-link'>
<a class='blog-pager-newer-link' expr:href='data:newerPageUrl' expr:id='data:widget.instanceId + &quot;_blog-pager-newer-link&quot;' expr:title='data:newerPageTitle'><data:newerPageTitle/></a>
</span>
</b:if>

<b:if cond='data:olderPageUrl'>
<span id='blog-pager-older-link'>
<a class='blog-pager-older-link' expr:href='data:olderPageUrl' expr:id='data:widget.instanceId + &quot;_blog-pager-older-link&quot;' expr:title='data:olderPageTitle'><data:olderPageTitle/></a>
</span>
</b:if>

<a class='home-link' expr:href='data:blog.homepageUrl'><data:homeMsg/></a>

<b:if cond='data:mobileLinkUrl'>
<div class='blog-mobile-link'>
<a expr:href='data:mobileLinkUrl'><data:mobileLinkMsg/></a>
</div>
</b:if>
</div>
<div class='clear'/>
</b:includable>

4. Now look for <data:newerPageTitle/> and <data:olderPageTitle/> in the above code inside your Blogger template code editor. To make it easy we've highlighted the lines which contain these two codes.

<data:newerPageTitle/> - Generates the newer page link text, by default "Newer Post"/"Newer Posts" for post page and index/archive pages respectively.

<data:olderPageTitle/> - Generates the older page link text, by default "Older Post"/"Older Posts" for post page and index/archive pages respectively.

Replace each with the text you want in place of it. For example suppose I want "Previously Written!" & "Next For Read!" to replace the default text then my code would look something like this.

a. For "Older" page link I would replace the 2nd highlighted part with this:

<a class='blog-pager-older-link' expr:href='data:olderPageUrl' expr:id='data:widget.instanceId + &quot;_blog-pager-older-link&quot;' expr:title='data:olderPageTitle'>Previously Written!</a>

b. For "Newer" page link the edit on the 1st highlighted part in the main code above would be this

<a class='blog-pager-older-link' expr:href='data:olderPageUrl' expr:id='data:widget.instanceId + &quot;_blog-pager-older-link&quot;' expr:title='data:olderPageTitle'>Next for Read!</a>

Use your own text you want to replace the default pagination link text and then save the template. If you did it right then the changes must appear on the blog like this:


#2 Method: Using JavaScript

This doesn't require much edits and is also easily revertible. But this is just like a layer, while the actual text that was generated during the page was still the default one, this JavaScript changes the DOM to the change the text inside the specific page links.

<script type='text/javascript'>
function changePageLinkText(a, b) {
document.getElementById("blog-pager-older-link").children[0].innerText = b;
document.getElementById("blog-pager-newer-link").children[0].innerText = a;
}
document.addEventListener("DOMContentLoaded", function() {
var newerText = "Enter Newer Text"; // Replace [Enter Newer Text] with your own text
var olderText = "Enter Older Text"; // Replace [Enter Older Text] with your own text
changePageLinkText(newerText, olderText);
});
</script>

Replace the text "Enter Newer Text" and "Enter Older Text" with the text you want to appear in the corresponding links.

To place this code in the template, go to Blogger Dashboard -> Template -> Edit HTML -> Now press CTRL+F/CMD+F and search for </body> and place this immediately before it.

Now save the template and the text on the pagination links will change according to what you've set in the code. You can edit the variables in the JavaScript code anytime you like to change the text that appears.

Note: this may not work in some older browsers and also in browsers that turns off JavaScript.

Adding AdSense Ad Inline With Post in Blogger

There are numerous tutorials and tips on increasing revenue on AdSense by using different ad placement techniques and practices, many of them work great, but Ads in the main body content is one of the most vital place.


Ads placed in post body can make a significant difference in the revenue but you have to do it wisely, it is where the main focus of a site's visitor is for most of the time during their visit so it is important to make sure the experience is not obstructed for the visitor due to the ads.

In this tutorial you will learn a simple way to add AdSense ad in your post and have it display in a good manner that is by floating the ad to a direction and have the paragraphs wrap around it.

Set Things Up

You can simply paste an Ad code in the post editor and the ads will appear but that isn't always what you need. How about floating it to the left or the right so the text wraps around it? We are going to learn just that by using simple markup and CSS so you can selectively add the Ads to any post at the best position you like.

Add The CSS Styles

We will get onto the main part where you have to work with the ad codes later before that let's set a few lines of CSS that is going to complement the box which is going to contain your Ad. This tutorial is meant for square ads only.

/* By default it floats to left */
.ad-container {
float: left;
padding: 10px 0;
padding-right: 10px;
}

/* For ads floating to the right */
.ad-container.right {
float: right;
padding-left: 10px;
padding-right: 0;
}

/* Centered Box */
.ad-container.center {
float: none;
padding: 10px 10px;
text-align: center;
}

/* Clearing floats */
.ad-container br {display: none;}
.ad-container:after, .ad-container:before {
content: "";
display: block;
clear: both;
}

If you are not sure where to add this CSS code please check the guide on adding CSS to a Blogger blog

The HTML Container

What does this do? Well, you can, as I already mentioned, paste the Ad Unit's code provided by AdSense in the HTML mode in the post and the ad will start appearing but you get a very little and not-an-easy option to position the ad as you like. With this you can.

Copy the following code and have it saved in your favorite text editor so you can use it in the next steps easily.
<div class="ad-container">
<!-- Paste your code here -->
</div>

The HTML markup is simple, just put your AdSense code between the first and the last line i.e where <!-- Paste your code --> is and that is it.

You need to know a small thing if you want to have the ad centered to floated to the right as by default it floats to the left. Check the following line of codes trimmed from the HTML markup provided above.

<div class="ad-container center">
We added the keyword "center" in side the class="" attribute. If you want the ad to appear centered then you have to add it too to your markup.

<div class="ad-container right">
In case you need it on the right just add "right" in there and that's it. Simple!

Once you have this markup ready with your AdSense Ad code you may proceed to the new steps that guides you through adding it to the post through post editor.

Put The Final Code In Post

By now we assume that you have finalized the code i.e edited the markup and included your ad unit code where described.

To put it into your post click on the "HTML" button when you are in the post editor



After switching to the HTML mode paste your code around the text where you want it to appear. Mostly ads are put at the start of the blog post but if you wish you can put anywhere for example at a position where you know the readers are going to spend most time reading or focusing. 

Make sure that when you paste the code anywhere in the post in HTML mode you paste it outside a <span> or <div> tag that may be there to contain some other text or paragraph/image.

For any further help on this you may use the comment box below to let me know. 

Now Drag & Drop Images in Post Editor in Blogger

Blogger has announced a new and very useful: Drag and Drop images in directly draft posts to upload them!

Credit: http://www.memegasms.com/


Blogger's post editor has been on a very slow improvement over the time, though it is now free of many bugs and errors that caused havoc among Blogger authors while even writing a simple post.

How Do I Know?

Open up a post in the editor and drag and drop an image from your computer in the post editor (in Compose mode) and the images will be uploaded and added to the post as you would've done with the "Insert Image" option in the toolbar.

When you click the "Insert Image" icon for the first time you will be presented with the notification letting you know about the new feature so that you can use it from next time instead of proceeding with a little lengthier process of selecting > uploading > again selecting and placing the image.

From the official Blogger Help Forum thread
It makes it easier for a blogger to place images in the post. A great relief for people who happen to upload a lot of images on their blogs.

Wasn't it possible already?

No. Before you could sure drag and drop images into the post editor and it would have even shown up but it' was not the same without the support it has implemented now. When you did that before the images were not uploaded to any server instead were added into the post as long series of text that encoded as the image's data.

It isn't the best practice for drag and dropping image though, so we said no to it.

Sign-in to Blogger using Non-Google Email Address

Recently there have been a lot of confusion for logging in among Blogger users who previously signed-up on it with a non-google email address i.e with a Yahoo or other service.


The confusion arises for one reason: Uniting all Google services under one Google account, so the login page for all your Google services like Gmail, Blogger, Webmaster Tools etc. looks the same.



Previously all the Google services had different login page if you remember, just a year or two ago but now which can be a called a good move by Google leads to a lot of confusion, at least for many Blogger users.

How to Login?

Your Google account doesn't have to be necessarily a @gmail.com address, Blogger is a Google product and falls under one Google account, but you can still use the email address you used to sign-up for Blogger with.

Just go to Blogger.com (in logged-out state) and log into it with your @yahoo, @hotmail or any other email address you sign-up with. 

Using the HTTPS Option in Blogger and Things to Know

Blogger has after a long time come up with a new option for technical settings of the blogs, and this time is is something that most Blogger's didn't generally expected: The option to serve their blogs over HTTPS.

https option blogger settings

This surely came as a surprised, and especially on a platform like Blogger. Most people use it for blogs, and generally blogs doesn't require so much protection against data theft. Do note that serving your blog over has nothing to do with the security of your Blogger account, but to ensure that the data  from your blog's domain that is being transferred to a visitor is more secure than the normal HTTP.

Other than the security of the data HTTPS do has some very interesting advantages, for an instance many advanced APIs in HTML5 allows sites to use features that requires advanced device or application access.  But that is generally insignificant for any regular or even advanced Blogger.

What is HTTPS and What Does it Do

HTTPS has no significant effect on your search rankings or such, or the content that is displayed or presented to the visitor, only the way it is done is affected, or to say improved and secured.

It stands for "HyperText Transfer Protocol Secure", which clarifies its true meaning, it is secure, yup, it makes difficult for a hacker to steal data between the user and your blog. But these are implemented mainly on sites that requires protection from potential data thefts, like a Banking Site, or many sites like Google, Facebook, Twitter etc. which has to protect a users data that is being transferred over the air from thefts. These are some examples, but you will see the use of HTTPS not only these poplar but more business and services websites. 

Why is encrypted data so important? It is important when you are transferring content that can be a subject of data theft. A website that asks for your credit card detail so that you can pay money mostly use HTTPS and advanced encryption to ensure that a hacker doesn't steal the data and decrypt it that might reveal the details to them. Credit card details is one example, other reasons are to protect the transfer of cookies, which might give away a way for the hackers to pretend to be you and log into a site with the use of those cookies and HTTPS just gives the data more protection. 

Should I use it?

Most people who when visit a site with HTTPS they sub-consciously get a assurance that the site is genuine and safe to use, probably even better than competitors with only HTTP. It does help a visitor to decide physiologically to either trust the site or not. Anyways that is not very similar with a blog, most people don't expect HTTPS being implemented on a blog they just want to read, though it doesn't harm the experience either. 

HTTPS can be prove to be helpful but at the same time can be an obstruction to small things that you might be doing. For example when your blog is on HTTPS and you suppose have linked an image from another site with only HTTP in its URL the browser may give out a "mixed content" warning which might confuse a visitor who doesn't know what's going on and might possibly lead them away.  Though those are not malicious but might give out a feeling of it, so when you use HTTPS you have to make sure the resources like assets files and images are also on HTTPS. 

On the other hand you might also note that you should not embed contents that are not on HTTPS, but this isn't a big issue if you mainly embed content from sites which already serves on the secure protocol i.e HTTPS like Google Docs, YouTube and many other well known site. 

Benefits

  1. Visitors are ensured that the site they've opened is genuine and not a malicious site that they've been redirected to without their knowledge. 
  2. Any person trying to manipulate the content that is being transfer from your blog to the visitor will find it more difficult, thus providing security to the data.
  3. If you are tech-savvy then there are some more advantages of it that you can enjoy through latest web technologies eg. the notification API or the use of media devices through the site

Things to look out for

  1. If you have third party gadgets that uses resources on the general HTTProtocol errors might come up as HTTPS suggests only resource on the same protocol be served.
  2. Only for ".blogspot.com". Not available by blogger for custom domains, though HTTPS services might be available from your domain registrar. 
  3. 'http://' doesn't redirect to the secure version if some types it in. Though when you have turned off "HTTPS Availability" your blog's URL would redirect to the HTTP even if a user types in "https://" 
If you are unsure about it then I would recommend you to research more about HTTPS and its technical aspects to make a decision, else there is no harm in staying with HTTP though.

It is though not for everyone. A blog anyways doesn't generally needs HTTPS but this has sure come as a breeze of hope for many folks who might have wanted to have this on Blogger. So if you know what you are doing then you are good to go.  

On a further note I would suggest you to visit this official forum thread to learn what the users have to say about this feature: https://productforums.google.com/forum/#!topic/blogger/AYiZ_QjkbxE


Adding Two Or Multiple Column Paragraphs in Blogger Posts

Writing is a brilliant thing, but writing with style is even brilliant! But one thing that many blog authors want to have is the multiple column paragraphs, that's paragraphs side-by-side.

Above is an example of three column paragraph. In this tutorial I am going to guide you how to work with multiple column or newspaper style paragraphs in Blogger editor.


Why not use MS Word to copy and paste?

One simple idea is to format the text in MS Word or some rich text editing software and then copy and paste the code in the post editor, but I would not recommend it, rich text editing software mostly aren't made for the web, and the code/markup they generate is not compatible with HTML, so it's not completely a good idea.

Basic Prerequisite

Mostly the first part is one-time setup, once you do it you can easily add these style of paragraphs to any new or existing blog posts.

This would require a bit knowledge of basic HTML to be able to tell what are HTML markup, and most of you might already be familiar with it if you have worked in the "HTML" mode in Blogger post editor.

Even if not I will tell you the basics things you need to know, and that would take no longer than 5 minutes.

Let's get started

There are two parts in this, first is the one-time setup of the CSS in your Blogger Template (See how to apply CSS to your Blogger Blog) and the last one is to create the HTML markup for the columns of paragraphs, and set the required configurations like how much space you want a column to take, like 1/4, 2/4 etc. and that also includes adding the text you want in each column.

1. The CSS Code

First thing as we discussed is the CSS code that handles all the styling this particular HTML markup would need in order for the paragraphs to be displayed in multiple columns.

Copy the following CSS code:

/* 
# Multiple Paragraphs style by Deepak Kamat

# depy45631@gmail.com (author)

# Free & Open License to Use in commercial and or personal projects/works.
*/
.multiple-para {
margin: 15px 0;
}
.multiple-para *,
.multiple-para *:after,
.multiple-para *:before {
box-sizing: border-box;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
}

.multiple-para:after,
.multiple-para:before {
content: "";
display: block;
clear: both;
}

.multiple-para .para-50 {
display: block;
float: left;
width: 50%;
padding: 0 10px;
}

.multiple-para .para-33 {
display: block;
float: left;
width: 33%;
padding: 0 10px;
}

.multiple-para .para-25 {
display: block;
float: left;
width: 25%;
padding: 0 10px;
}

Copied? Now refer to this tutorial about adding CSS styles to your blog and follow the instructions to apply the code in your blog correctly.

Note: Do not change and or delete anything from the code provided if you don't have idea of what you are doing.

The HTML Base

The Base code is pretty simple, nothing very fancy, just a few regular div tags are needed for this. Following the simplest example of code for this.

<div class='multiple-para'>
<div class='para-25'>This is the first paragraph</div>
<div class='para-25'>This is the second paragraph</div>
<div class='para-25'>This is the third paragraph</div>
<div class='para-25'>This is the fourth paragraph</div>
</div>

I haven't added any large piece of text to make it look clear, just a small line of text "This is the nth paragraph" for each.
About the Configuration
How this works? The thing that makes this HTML work visually is the CSS we added. To configure this we have to change the class names i.e class='para-25' to the other possible names para-33 and para-50

The idea is simple, in the above example code, each paragraph i.e <div> tag takes 25% percent of the space available and thus 4 paragraphs with 25% width can be fitted in. If we need three paragraphs we can change para-25 to para-33 and the three will fit in perfectly.

We have to keep in mind that the sum of width of all the paragraphs in the container (<div class='multiple-para'>) doesn't exceed 100, else it will break down and cause problems.

Here's the list of configurations you can make:

  • 2 Columns - para-50 | para-50
  • 3 Columns - para-33 | para-33 | para-33 OR para-50 | para-25 | para-25 
  • 4 Columns - para-25 | para-25 | para-25 | para-25
Not sure how to use any of this information? Here's a demo, say I want 3 columns of the same width then I will do this with the HTML markup provided above:
<div class='multiple-para'>
<div class='para-33'>This is the first paragraph</div>
<div class='para-33'>This is the second paragraph</div>
<div class='para-33'>This is the third paragraph</div>
</div>
And a live demo of it (with different text of course):


Lorem ipsum dolor sit amet, adipiscing elit. Ut non ex venenatis, egestas est vitae, lacinia libero. Sed pretium aliquet ultricies.
Cras pretium venenatis sollicitudin. Nulla sit amet condimentum erat. Aliquam mattis elementum mauris vel suscipit. In lacinia nec felis dictum vehicula.
Integer blandit, ex eu tristique eleifend, urna eros tempor leo, nec tincidunt risus purus sed massa. Pellentesque cursus eros.

Using the HTML

The section above must be read and understood well before you continue. In the previous section I explained how the paragraphs can be configured by changing the class names, the names that inside class='' in the HTML tags.

1. I recommend you to use a plain text editor like Notepad copy and edit the HTML code, it will be cleaner. Copy the HTML code into your text editor and replace the text inside the HTML tags, for e.g the red highlighted part is what you have to change:
<div class='para-33'>This is the first paragraph</div>

2. Once you are done editing the HTML markup, go the the Blogger post editor. And switch to HTML mode, the button is on the top left corner below the post title line "Compose | HTML", click on "HTML" and paste the HTML markup in the place where you want the multiple column paragraph to appear.

Responsive (with Media Queries) Paragraphs

If you are using a Blogger template which is responsive, then on smaller sized devices the text will be squeezed to fit, we will need a CSS with media queries rule to control that. Though I haven't still included it right now, but if more people request it in the comments I might consider updating it.

So do subscribe to our blog feed to receive update

PiSquare - Responsive and Search Optimized Blogger Template

A template plays a very important role in the exposure of your blog on the web and major search engines, if your blog is lacking search visibility then it obviously needs improvement in it's structure and design.




PiSquare Blogger template is a clean and minimalist Blogger template with a lot of customization options like color scheme editor and header image customization.

It is a responsive blogger template which means you don't have to switch between mobile and desktop template to view your blog on mobile phones and tablets or any small device.

Features

You will be able to experience the feature of the templates only when you install it on your own blog and have the full access to customize it according to your needs but let us tell you a few features of this template

RWD: Responsive Web Design

As already discussed, Responsive Web Design let's your blog display on mobile devices without having to scroll horizontally or zoom in or out to view the content properly. The columns automatically adjusts itself to fit the view port and provide the reader a seamless experience.

Search Engine Optimized

As always we make a template one thing in mind and that is to make it comply with all the search engines with proper methods and techniques. The template is search optimized which means your blog's content will appear on search engines in a well manner which might increase traffic to your blog.

Insanely Fast

Being fast is one of the most important aspects of SEO, if your blog isn't fast and it takes time to load then it's a disaster and search engines might not give you any priority even though you have great content. PiSquare uses techniques that loads the most important part and resources first and then the rest.

These are some of the major features of the template, other visual and customization features are on the following list:

  1. Color Scheme Customization: Change the default color scheme to anything you like in the Blogger's Template Editor, under "Advanced" option (listed in the documentation)
  2. Video and Image Post Summary: The template displays your posts as summaries with a big image or video from the post and a short text snippet. 
  3. Responsive Videos: If you post videos on your blog then you might want to make them responsive too, well we have got you covered! Make videos responsive as you like (listed in the documentation)
  4. Pre-added Sharing Button: Sharing buttons of the major social sites are already present on the blog posts so that users can share your content easily. 

This Template is For ?

This template is multi-purpose Blogger template which means you can use it for any niche or topic. Travel, Cooking, Sport, Video Blogger, Photography or anything you can think of. With a little customization you can personalize the template to make it fit your blog.

Buy or Download for Free

You can either buy or download the template for free from MasTemplate.com. The premium version costs only $10 and you can get support and free updates with the ability to use the template without the the attribution in the footer.