Add content to bottom of single posts
-
Hi there, I’m trying to add a simple line to the bottom of each post. As per another forum thread, I’ve added the following to the single.php:
<?php
add_action(‘wp_footer’, ‘add_stuff_to_bottom’);function add_stuff_to_bottom() {
$content = ‘<hr style=”height: 0px; border-bottom: 3px solid #000000;” />’;
echo $content;
}
?>Right now, the code is located after the following line:
<?php endwhile; // end of the loop. ?>
which results in the horizontal line showing up at the very bottom of the page, outside the main wrapper. I’ve tried it in other locations but can’t figure out how to get it at the bottom of each post. Thanks for your help. site: https://www.meandmydiy.com
- The topic ‘Add content to bottom of single posts’ is closed to new replies.