How do I add code to </body> tag in my site? I have a child theme

Do I do this through the Appearance>editor or somewhere in the X settings?

TIA!

Hi there,

You can do it by adding this code in the functions.php file of the child theme which you can find when you login through FTP then go to wp-content/themes/x-child:

function more_footer_content() { ?>

<!-- Add your code here -->

<?php }

add_action( 'wp_footer', 'more_footer_content', 999999 );

Hope this helps.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.