Best way to Remove Sidebar for a Specific/Single Post from All Blogger Templates

Best way to Remove Sidebar for a Specific/Single Post from All Blogger Template

Hy Folks, Today we will learn how to remove the sidebar for a Specific Post in Blogger. Sometimes we want to show a full-width Post that has no sidebar. For a blogger, this option is not available in the setting. we have to add code in the Blogger HTML. I saw in many sites or videos they are telling you just add CSS on the basis of some condition. But they are not working because that Classes does not exist in the blogger templates. they work for some peoples templates but not for all. so today I got a solution to this. I have written some code that will be work for All Blogger templates. 

So let's start.

Please do Follow the Steps

Step 1 - Go to the Blogger DashBoard and click on the Theme and then click on customize and Edit HTML.


Step 2 - Press Control+F )  search Main Wrapper or main-wrapper and hit enter you will see the text as shown on the image below.


Best way to Remove Sidebar for a Specific/Single Post in All Blogger Templates


 Watch the video Click here

 

Step 3 -  Search canonical and copy the text which is shown on the image below and keep the text in any text editor.  


Best way to Remove Sidebar for a Specific/Single Post in All Blogger Templates


Step 4 -  Search again Main wrapper or main-wrapper and hit enter, after entering you will reach the position. Now copy that text which is copied by you in step 3 and paste it into the input tag and copy the below tag and paste it above the main tag.


 <input expr:value=' Paste here text which is copied '  id='full_width' type='hidden'/> 


After pasting the code your Html should look like the below image.



Best way to Remove Sidebar for a Specific/Single Post in All Blogger Templates



Step 5 - Add style attribute in the main tag which has main-wrapper id.


 Add  this  style='width: calc(100% - 355px);'  


 <main id=''main-wrapper'  style='width: calc(100% - 355px);'>


After adding the style tag your Html should look like the below image.



Best way to Remove Sidebar for a Specific/Single Post in All Blogger Templates


Step 6 -  Search calc(100% - ($(sidebar .  just remove the below text 


width:calc(100% - ($(sidebar.width) + 35px));



Best way to Remove Sidebar for a Specific/Single Post in All Blogger Templates


After removing the text your code will look like this.


Best way to Remove Sidebar for a Specific/Single Post in All Blogger Templates

  

*Note- If in your HTML you have not found calc(100% - ($(sidebar . So don't worry just search #main-wrapper, be careful you will find so many results of #main-wrapper you have to come only first result search.



Best way to Remove Sidebar for a Specific/Single Post in All Blogger Templates

After removing the text your code will look like this.


Best way to Remove Sidebar for a Specific/Single Post in All Blogger Templates

And now click on the Save button

 
Best way to Remove Sidebar for a Specific/Single Post in All Blogger Templates



Step 7 -  Now create the post for whom you don't want a sidebar.


Best way to Remove Sidebar for a Specific/Single Post in All Blogger Templates



Step 8 -  Create Title and Description.


Best way to Remove Sidebar for a Specific/Single Post in All Blogger Templates


Step 9 -  Click on the HTML view.


Best way to Remove Sidebar for a Specific/Single Post in All Blogger Templates



Step 10 - After clicking the HTML view. Please follow the below steps which are shown in the image below.


1 - Copy the Post link.

2 - Copy the below code and paste it into the bottom of the page.


<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
<script>
 
$(window).load(function() {
  
 let Page_url = $("#full_width").val();
  if(Page_url == "Paste here your post URL"){
          $("#main-wrapper").removeAttr("style");
    }
});
</script>


3 - Paste your Post URL in the condition which is shown in the image below.



Best way to Remove Sidebar for a Specific/Single Post in All Blogger Templates


4 -  Publish your post


I hope this video will help You ЁЯСЗ



Step 11 -  Now go back to the theme and click on the customise then Edit HTML and Search  <!-- Sidebar Wrapper --> or sidebar-wrapper and hit enter, after entering you will reach the section. Copy below code and paste there which is shown in the image below.



 <b:if cond=' data:view.url.canonical  !  = Paste your post URL for whom you don't want to a sidebar  ' >

       

</b:if>


Best way to Remove Sidebar for a Specific/Single Post in All Blogger Templates


Best way to Remove Sidebar for a Specific/Single Post in All Blogger Templates



Note* Make sure, In Step11 which code has been given, there will come that text which is copied by step 3. and your post URL for whom you don't want to a sidebar. 



Now Finally, Open your URL in the browser and reload the page. You will see there is no Sidebar for a Post. You can check another post you will see Sidebar.


Best way to Remove Sidebar for a Specific/Single Post in All Blogger Templates



Yeah! You have learned ЁЯШК

I hope you understood this and like this article. if you like it so, please give feedback in the comment section.

If any mistakes I made here, so please let me know and improve me.

If you have any query, feel free to ask me  ЁЯШК 


Recommended Post




Post a Comment

Please do not enter any spam link in the comment section.

Previous Post Next Post