Skip to main content

Related posts. Looping with Multiple Labels

Enhancing the Related Posts code, we will now move on with Loops on multiple labels. It's advised to read Related posts with multiple conditions and then continue to read this post to understand things better.

<!--See related posts appear only if required-->
<b:if cond='data:post.labels any (label => label.name in [&quot;Blogger Customizations&quot;,&quot;Blogger Tricks&quot;])'>
<b>See related posts:</b>
</b:if>

<!--Un-ordered list tag begins-->
<ul>

<!--This loop should be passed with Labels to be filtered for Related posts-->
<b:loop values="data:post.labels filter (label => label.name in [&quot;Blogger Customizations&quot;,&quot;Blogger Tricks&quot;])" var="label">
        <li><a expr:href='data:blog.homepageurl + &quot;/search/label/&quot; + data:label.name'><data:label.name/></a></li>
</b:loop>

</ul>
<!--Un-ordered list tag begins-->

This loop takes care of linked lists and fits into all kind of posts. All we need to do is find the label name and added it in two places as highlighted in green.

Therefore, a third label can be added like below(yellow highlighted) and the code will look like,

<!--See related posts appear only if required-->
<b:if cond='data:post.labels any (label => label.name in [&quot;Blogger Customizations&quot;,&quot;Blogger Tricks&quot;,&quot;Custom Domains&quot;])'>
<b>See related posts:</b>
</b:if>

<!--Un-ordered list tag begins-->
<ul>

<!--This loop should be passed with Labels to be filtered for Related posts-->
<b:loop values="data:post.labels filter (label => label.name in [&quot;Blogger Customizations&quot;,&quot;Blogger Tricks&quot;,&quot;Custom Domains&quot;])" var="label">
        <li><a expr:href='data:blog.homepageurl + &quot;/search/label/&quot; + data:label.name'><data:label.name/></a></li>
</b:loop>

</ul>
<!--Un-ordered list tag begins-->

This will workout well and the number of lines of code is considerably reduced.

Comments

Feeds for you

Blogger profile confusions

Since Google has closed it's social networking service called the Google+ for consumers, few products has some effect on it. One of them is our very own blogger.

We could see that update notification in our blogger dashboard as below,



Besides from the things gone as mentioned in Blogger's official blog post here -> An update on Google+ and Blogger, we have a confusion on profile that needs to be clarified. That is the reason why I am writing this down.

There are now two profiles,

Blogger profileGoogle profileBlogger profile - Where does this appear?
This appears in all of your blogs if you have your profile gadget added. You can see that on this blog in the top right, How do I update this profile? Go to blogger.comNavigate to Settings > User settingsClick Edit under Blogger in User profile sectionYou'll be navigated to https://www.blogger.com/edit-profile.g where you can edit your profile that appears on the blog.Google profile - Where does this appear?
This appears in…

DWI - Not all the time "Authoritative" helps

We already saw the common issues when custom domain is involved where we saw a tool called DWI - Dig Web Interface which will help us get DNS records of a particular domain.

Today while coming across a forum thread, got to notice a strange thing ever. It's not the first time however. If you refer the article about corrupted DNS, the blog URL used had similar issue.

It is normally recommended to use "Authoritative" under Name servers when digging a domain. However this doesn't always workout.

How to connect any other profile in "About me" widget?

In this article I am going to tell "How to connect any other profile in "About me" widget along with blogger or Google+?"