Monday, 2 January 2012

Make Your Post Page Title UnClickable in Blogger

You might have seen that the titles of single post of WordPress blog is unclickable. It means URL of the post is disabled in the post titles. This feature is only implemented in post page but not in homepage. Lets take this blog as an example.



First, visit the homepage of this blog, HackTutors. Now, investigate any of the post title. You see the title is clickable and you can easily go inside the post by clicking the title of a post. Now once you are inside the post page, view the post title. Then you see its unclickble. Finally, you can do this in Blogger!

So, lets see how you can do this in few steps.

Step 1:
Go to BloggerDashBoard > Design > Edit HTML > check Expand Widget Template.

Step 2:
Find the following code. Please note that this code mat not be similar in your template. I use H1 tag. But in your case it might be H2.

  <b:if cond='data:post.title'>
      <h1 class='post-title entry-title'><b:if cond='data:post.link'>
       <a expr:href='data:post.link'><data:post.title/></a>
     <b:else/>
        <b:if cond='data:post.url'>
          <a expr:href='data:post.url'><data:post.title/></a>
        <b:else/>
          <data:post.title/>
        </b:if>
     </b:if>
      </h1>
Now, replace the above code with the following:

 <b:if cond='data:post.title'>
      <h1 class='post-title entry-title'><b:if cond='data:blog.pageType == "item"'>
     <b:if cond='data:post.link'>
       <data:post.title/>
     <b:else/>
        <b:if cond='data:post.url'>
          <data:post.title/>
        <b:else/>
          <data:post.title/>
        </b:if>
</b:if>
 
 <b:else/>
 <b:if cond='data:post.link'>
       <a expr:href='data:post.link'><data:post.title/></a>
     <b:else/>
        <b:if cond='data:post.url'>
          <a expr:href='data:post.url'><data:post.title/></a>
        <b:else/>
          <data:post.title/>
        </b:if>
</b:if>
     </b:if>
      </h1>
Step 3:
Now save the template and you are done!

Finally you can visit you blog homepage and click on the post title and you'll find that your post title are unclickable in post page.

No comments:

Post a Comment