Blog Blogger CSS/CSS3 HTML/HTML5 Technology Website

Display What You Want on Blogger

It was always some blogger’s idea of viewing some content or widget on only some pages, or search labels or archive pages. But it was really hard to do all the script coding and various possible things!Did some small research here and there, and with Blogger Plugin’s post, I was able to find, innovate a new technique in blog, “Selective display of widgets or content, based on URL”. Best part of it was its so damn easy.

So let me take you through the simple code snippets.

Want to display a welcome message or image or any other code only on Home Page.

Now you want to display some other stuff on all pages except the Home Page then,

Have a piece of information or code for Archive Pages,

And some content that is not related to Archive Pages,

Content specific to one specific post,

And similarly content that doesn't relate to that post.

Something special for Static Pages,

Some special content for all pages except Static Pages.

Some specific data or image on specific url.

Replace the The_Particular_Page_URL with URL you need the widget or content to be displayed

Something you dont want to be displayed on the specific page.

Replace the The_Particular_Page_URL with URL you need the widget or content not to be displayed

Now we move to Conditional Coding, again, simple as drinking water

Two URL's you want the content to be displayed.

Replace the The_Particular_Page_URL1 & The_Particular_Page_URL2 with respective URL’s you need the widget or content to be displayedNow the ELSE condition,

If True the content to be displayed.

If False the content to be displayed.

Something only on the first Post, (Example: Ads).

1.) OR Condition is not discovered yet
2.) There isn’t a direct way to implement AND operation
3.) Inserting widgets inside these tag might throw errors, saying b:if tag is not allowed in b:section

Source: Blogger Plugins

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.