Quantcast
Channel: WordPress.org Forums » All Posts
Viewing all articles
Browse latest Browse all 112576

DLThompson06 on "Add content to bottom of single posts"

$
0
0

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: http://www.meandmydiy.com


Viewing all articles
Browse latest Browse all 112576

Trending Articles