Showing only post titles on label pages

8:36:00 AM |

  1. Login to your to your Blogger account.
  2. Go to Dashboard > Design > Edit HTML.
  3. Back up your template.
  4. Tick the  Expand Widget Templates checkbox on top right of the HTML window.
  5. In the code window, look for this line: 
    <b:include data='post' name='post'/>
  6. Now replace that line with the code below (just copy & paste): 
    view sourceprint?
    01<!--Label and archive page title only hack-->
    02<b:if cond='data:blog.searchLabel'>
    03<h3 class='title-only'><a expr:href='data:post.url'><data:post.title/></a></h3>
    04<b:else/>
    05<b:if cond='data:blog.pageType == "archive"'>
    06<h3 class='title-only'><a expr:href='data:post.url'><data:post.title/></a></h3>
    07<b:else/>
    08<b:include data='post' name='post'/>
    09</b:if>
    10</b:if>
    11<!--ns-services.blogspot.com-->
  7. Click Save Template.
  8. To change the look of the titles, you have two options:
    • Use inline styling by inserting style attribute after <h3 in lines 3 and 6, like in this example :
      view sourceprint?
      1<h3 style="margin-bottom: 15px;" class='title-only'><aexpr:href='data:post.url'><data:post.title/></a></h3>
    • Add a separate element definition in CSS, like this: 
      view sourceprint?
      1.title-only {
      2/* add styling codes here here */
      3}
      And place the it before ]]></b:skin> line in your HTML.
  9. Finish and enjoy!