My WordPress site uses a child-theme (of the default twenty-sixteen) and now I would like to insert a new line into the single.php
file.
I know that it’s better to use the functions.php
file of the child-theme than inserting the new line directly into the parent theme’s single.php
file. (Correct me if I’m wrong.)
I would be grateful if somebody could show me how to do it properly. I would like to insert this line
<div class="fb-comments" data-href="https://wordpress.stackexchange.com/questions/212498/<?php the_permalink(); ?>" data-numposts="5"></div>
into the
<div id="primary" class="content-area">
element, right above the closing
</main>
tag in the single.php
file.