Introduction
In this blog post, I’m going to help you remove any unwanted section from your website. Maybe you need to remove header or footer in order to add your own custom creative version. Or you want to remove unnecessary comment section. This tutorial will work for any section you need to remove permanently. We’re going to use wordpress and Real-Time Find and Replace plugin to get it done. Just follow along.
Add Real-Time Find and Replace
Log in to your wordpress dashboard, come to plugins and click on ”Add New Plugin.” Search for Real-Time Find and Replace. Install the needed plugin and activate it. We’re going to need that plugin to delete any section, but before we’re able to do it, we need to ”grab” the HTML code of the section on our website by opening developer tools and inspecting the page.
Find Web Section HTML Code
Come to your website homepage, then type CTRL+SHIFT+I (or right click+inspect) to open developer tools so we can find the necessary web section HTML code. On the top left, click on ”select an element in the page to inspect”. Now highlight the section using your cursor, in this example – I’m going to remove the entire header section. Then click on the highlighted section. Now we need to find the beginning and the end of header section HTML code. Find the beginning by pointing your cursor to the highlighted header section. In this example, the beginning is under ”<div class>=”ast -primary-header-bar…”. The end is just where it says ”</header>.”We need to include both ”</header> and under it –> ”<!–#masthead–>.” Once you’ve found the beginning and the end of the HTML code, we need to copy that entire section. How are we going to do that? We need to view the page source. Right click on your homepage and click on ”view page source.” On your new tab – viewed page source, press CTRL+F in order to search for the HTML code we need to copy. For the purpose of removing header section, I’m going to search for ”header class.” Under ”header class”, find the beginning and the end of the web section HTML code as previously mentioned. Highlight and copy it.
Delete Web Section
In the last step, we need to paste the entire copied code in the blank space provided using Real-Time Find and Replace plugin and replace it with nothing. Come back to your wordpress dashboard. Select tools on the navigation menu to the left and click on ”Real-Time Find and Replace.” This is where our installed ”Real-Time Find and Replace” plugin is placed after its installation and activation. Unlike other plugins, which are placed under ”Plugins – Installed Plugins.” After clicking on ”Real-Time Find and Replace”, paste your copied HTML code under ”Find” in the blank space provided. On the right, where it says – ”Replace With”, just leave blank. Click on ”Update Settings.” Congrats, section of your website (in this e.g. – header) is removed. We just need to confirm it by refreshing our website page. ”Right click+Reload” on your website homepage, and as you can see – header section is successfully removed. You can do this for any section you desire to delete. Just follow my instructions provided here!
Bottom Line
Purpose of this blog post was to successfully hide/remove any section on your website, whether it be header, footer, comment section, etc. We used wordpress and Real-Time Find and Replace plugin to accomplish that task. All we needed to do was to open developer tools and find the necessary HTML code of the website section, copy and paste it in the blank space provided in the Real-Time Find and Replace plugin, replace with nothing and update settings. We’ve confirmed deletion of the website section by refreshing our website page. You can repeat this process for as many unwanted sections of your website as you need. Enjoy!