25.2 C
Thursday, October 28, 2021

    Latest Posts

    Body Tag: How to find and insert code within the tag in WordPress?

    Often times to enhance the functionality of the WordPress blog we need to add a certain script, verification codes or HTML codes etc. in Header, Body or Footer of the WordPress website. If you want to add some code to the body of WordPress then you need to find the body tag of the blog theme and for that, here is the two ways to add the code just after the <body> tag.  The structure of WordPress based is a bit different from other HTML, JAVA or ruby and rails based websites.

    Step by Step way to find the <Body> tag in WordPress.

    How to insert code after the opening <body> tag in WordPress?

    Step 1: Go to your WordPress dashboard and from right side select Appereance-> Editor.

    Step 2: Now from right top side select your current installed theme.

    Step3: At the right sidebar you will different .php files of your WordPress website. From those files find the header.php and select that to edit.

    Step 4: After selecting the “header.php” file, press ctrl+F and search for </head> and where the closing head tag situated, the <body > tag just started after that.  In the same way, your theme also has the <body> tag and just after that you can place the code you want.

    So where is the closing body tag in WordPress?

    To find the follow the same Step 1 and Step 2 given above but at Step 3 instead if header.php select the footer.php and either press crtl+f and search for </body> or just scroll down to the bottom of the file and you will find the closing body tag.

    - Advertisement -

    Latest Posts

    Don't Miss