Adding Static Box And Text At Bottom Of Posts

by 5 replies
7
I'm trying to add a static box and text at the bottom of all my wordpress posts. I want it to be under all the post and widgets but above the comments box.

I'm trying to do this in the single.php file but am having a very hard time getting it to work. Whenever I add text, links or images in this php file...all code below it goes away.

As you can see, I got the box to show up using a <div class="optinbox"> </div> but I can't get a small arrow image or text to show up inside the box.

Here is an example of what it looks like so far.

Beginner Workout Routine For Kids

So how can I get text and an image in that box without messing up the rest of the code?

It will be the following text plus a red arrow image.....

Get 52 free kids exercise activities to boost your kids energy so you know for sure they're getting exercise -- <a href="http://www.myfamilyexercise.com/kids-exercise-newsletter">click here</a>
#programming #adding #bottom #box #posts #static #text
  • <div class="optinbox">
    Get 52 free kids exercise activities to boost your kids energy so you know for sure they're getting exercise -
    <a href="http://www.myfamilyexercise.com/kids-exercise-newsletter">click here</a>
    </div>

    You mean the code above wouldn't work? I replaced your non-web long dash...
    • [ 1 ] Thanks
    • [3] replies
    • You can try the "Add Post Footer" plugin. Search for it on the wordpress plugin site.
    • I tried the plugins but they don't work right. They add the code right after the post and I want it after the social plugins and right before the comments box. They also add a sponsored link.

      Yes, the above code wouldn't work for me. When I add that code on my single.php page the following code goes away.

      <!--include comments template-->
      <?php comments_template(); ?>

      <!--do not delete-->
      <?php endwhile; else: ?>

      Sorry, no posts matched your criteria.

      <!--do not delete-->
      <?php endif; ?>

      <!--single.php end-->
      </div>


      <!--include footer-->
      <?php get_footer(); ?>

      -------------------------------------------------------
      If this was html here's the code I want to use.

      <table style="border: 3px solid #CC0000;" border="0" cellspacing="0" cellpadding="10" width="500">
      <tr>
      <td style="padding-top:15px;"><a href="http://www.myfamilyexercise.com/kids-exercise-newsletter"><img src="http://www.myfamilyexercise.com/wp-content/uploads/2011/04/red-arrow-1.gif" style="margin: -4px 10px 5px 0px;" border="0" alt="Free Kids Exercise Report" align="left"></a>
      Get 52 free kids exercise activities to boost your kids energy so you know for sure they're getting exercise -- <a href="http://www.myfamilyexercise.com/kids-exercise-newsletter">click here</a>.</td>
      </tr>
      </table>
      • [1] reply
    • I went back and bingo! You were right! The longer dash was messing the code up. Your shorter dash was the fix. Thank you!

Next Topics on Trending Feed

  • 7

    I'm trying to add a static box and text at the bottom of all my wordpress posts. I want it to be under all the post and widgets but above the comments box. I'm trying to do this in the single.php file but am having a very hard time getting it to work. Whenever I add text, links or images in this php file...all code below it goes away.