How To Remove Link From Post Titles For Blogger?


#1

Hello Mohammad, Take my salam and love.

I have seen a change in your parent blog (http://www.mybloggertricks.com) and I want to apply it my my blog.

The changed thing is Post title. It is clickable in your home page and while I enter your post page I have found post titles just working as normal text. Its not a link over there.

Screenshot: http://2.bp.blogspot.com/-WSGgWmc-kts/VRGRx4bPEBI/AAAAAAAAGFQ/sW_xKhGPyPc/s1600/problem-screenshot-saimoom.jpg

Please teach me how can I do this change. Waiting for your glory reply as soon as possible.

Thanks and regard, Saimoom Admin: www.shinemat.com


#2

I have got the solution. Customization area is

<b:if cond='data:post.url'>

Thanks in advance. Stay well friends.

Saimoom


#3

Hi @Saimoom, I think you have already got the solution. But still since you asked the question and this Topic might rank in the search engines, I am posting the solution.

  1. Go to Template > Edit HTML.

  2. Find <b:if cond='data:post.url'> and delete the line of code just after the first occurrence of <b:if cond='data:post.url'>.

Delete this line of code: <a expr:href='data:post.url'><data:post.title/></a>

  1. Add the following piece of code in place of the above deleted line of code:

    <b:if cond='data:blog.url != data:post.url'> <a expr:href='data:post.url'><data:post.title/></a> <b:else/> <data:post.title/> </b:if>

There are also some other ways to remove link from the Post title. But I find this one easy to implement. :stuck_out_tongue:

-Rohan Chaubey.


#4

W.salam dear @saimoom

@Rohan explained it well and here is what I have done on my blog

  1. Go To Template

  2. Backup your template

  3. Search for the following code or its similar

    <b:if cond=‘data:post.title’>

    <b:if cond=‘data:post.link’> <data:post.title/> <b:else/> <b:if cond=‘data:post.url’> <b:if cond=‘data:blog.url != data:post.url’> <data:post.title/> <b:else/> <data:post.title/> </b:if> <b:else/> <data:post.title/> </b:if> </b:if>

    </b:if>
  4. Replace it with the following code:

    <b:if cond=‘data:post.title’> <b:if cond=‘data:blog.pageType == “index”’>

    <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/>

  5. Save your template and you will find things working just fine! :smile:

This is a wise approach to disable linking to the same page and enable post title links only on homepage


#5

Just remove this <a expr:href='data:post.url'> code on your blog title…


#6

I’m using the following code for title:-

 
      
        
        
        
           | 
          
          Page Not Found |  
        
      
    

Because I want my title to be in the format- Post name | Blog name

Please tell me how can I merge both the things i.e. enable post title links only on homepage and my required layout in one single code.


#7

Why don’t you just make a new topic bout’ that :blush:


#8

@Mad Tell me WHY :smile: when I’m able to get the answer here only. Why should we just over populate the forum with queries. It will be better if we solve these type of too similar queries under one topic. This will also help any other member to get complete knowledge about the topic which he/she may not get when all these things are posted seperately. I think @Mohammad also thinks the same. I don’t have any problem in creating a new topic for my query.


#9

@Mad he is right dear. He can ask for queries which are related in context

@NamanKumar Dear the code you shared is for <Title> tags which is added inside your HTML document and not visible on your blog posts because the title which is shown on your Post titles uses the headline tag which is <h2> or <h1>

The <title> element:

  1. defines a title in the browser toolbar
  2. provides a title for the page when it is added to favorites
  3. displays a title for the page in search-engine results

The title tag code that you shared will do what you want and to change .

However I could not understand what you meant by


#10

Okay, Thank you very much @Mohammad, for clearing my basics. I know what to do now. Thanks! :smile:


#11

Hello In my Blogger blog the title of the posts on the homepage and clickable (addressing to the homepage again) and therefore underlined and of the colour set for links. That happened overnight without me changing anything and I would like to go back to unclickable post titles. How can I do that? I read the comments above but none of them seem to be right for me. This is the part of HTML you were speaking about (I think)

    <div class='mobile-index-arrow'>&amp;rsaquo;</div>

    <div class='mobile-index-contents'>
      <b:if cond='data:post.thumbnailUrl'>
        <div class='mobile-index-thumbnail'>
          <div class='Image'>
            <img expr:src='data:post.thumbnailUrl'/>
          </div>
        </div>
      </b:if>

      <div class='post-body'>
        <b:if cond='data:post.snippet'><data:post.snippet/></b:if>
      </div>
    </div>

    <div style='clear: both;'/>
  </a>

  <div class='mobile-index-comment'>
    <b:if cond='data:blog.pageType != &quot;static_page&quot;'>
      <b:if cond='data:post.allowComments'>
        <b:if cond='data:post.numComments != 0'>
          <b:include data='post' name='comment_count_picker'/>
        </b:if>
      </b:if>
    </b:if>
  </div>
</div>
  <b:include data='top' name='status-message'/>

  <b:if cond='data:blog.pageType == &quot;index&quot;'>
    <b:loop values='data:posts' var='post'>
      <b:include data='post' name='mobile-index-post'/>
    </b:loop>
  <b:else/>
    <b:loop values='data:posts' var='post'>
      <b:include data='post' name='mobile-post'/>
    </b:loop>
  </b:if>
</div>

<b:include name=‘mobile-nextprev’/> </b:includable> <b:includable id=‘mobile-nextprev’>

What shall I change? Thank you so much for your help in advance. Elena.


#12

Hello @Rohan, I am Rizwan, I have been following MTB since very long and I really appreciate Mustafa efforts on this and we would like to thanks all of team members of MBT for continuously providing the solutions for bloggers.

The code you provided worked well for our blog and its now appearing just like MBT post title, but after changing the code we found that our post title is not appearing on google plus when we are sharing any post and its same for Facebook and twitter too. Also the post title doesn’t appear even we put the whole title on Google search but on yahoo it appear pretty well. Even the post title doesn’t appear in Google if we add the our blog name at the end.

I am providing you the snapshot of all three original codes I have in my template along with the code which I currently have used.

Original template codes snapshot:

First code

second cod

<b:if cond=‘data:post.title’>

<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:if>

third code

<b:if cond=‘data:post.title’>

<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:if>

Below is my current used codes snapshot:

<b:if cond=‘data:blog.pageType == “index”’>

<b:if cond=‘data:post.link’> <data:post.title/> <b:else/> <b:if cond=‘data:post.url’> <b:if cond=‘data:blog.url != data:post.url’> <data:post.title/> <b:else/> <data:post.title/> </b:if> <b:else/> <data:post.title/> </b:if> </b:if>

</b:if> </b:if>

Second code: <b:if cond=‘data:post.title’>

<b:if cond=‘data:post.link’>
                          <b:else/>
                         <b:if cond='data:blog.url != data:post.url'> <a expr:href='data:post.url'><data:post.title/></a>                            <b:else/> <data:post.title/>
                                      <b:else/>
                                      <data:post.title/>
                                    </b:if>
                                  </b:if>
                                </h1>
                              </font>
                            </b:if>

Third code <b:if cond=‘data:post.title’>

<b:if cond=‘data:post.link’>
                                    <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>
                                </h2>
                              </font>
                            </b:if>

I have used the Rohan’s code in my second code which you can see in the used code snapshot image.

I would specially request Mustafa to reply to my query, please let me know if I need to change anything or the codes I am using currently is ok. Sorry for using the codes in my message and made it long because I was unable to add snapshots.