0
votes

I am trying to add a button to my WordPress template. Basically, I have the post and then there is the Related Posts Thumbnails widget that appears. I want the button to go between the text of the post and the related posts thumbnail widget. The code in my 'Single Post' that contains all of this is as follows:

<div class="post-content">
<?php the_content(__('<em><strong>More:</strong> Read the rest of this entry...</em>', 'life-is-simple')); ?>
</div>

I know the Related Posts Thumbnails plugin falls within this code because it's at that place when I 'Inspect Element' on Google Chrome. I can't find how to edit the order of things within that div though. Any help would be greatly appreciated, thanks!

EDIT

Clarification: I am using the Life Is Simple WordPress theme although it has been custom editing quite a bit (mostly on the CSS side of things though).

2

2 Answers

4
votes

That plugin is probably appending the output to the_content with a filter . That means , that the output is being added to the_content automatically. it is a common behaviour.

You need to look at the plugin“s admin interface to see if you can have an alternative way (I believe there is ) which is using a template tag. in that case, you should put the template tag after the div where the the_content() is .

EDIT I :

After a small dig, - in fact there is - you need to put

<?php get_related_posts_thumbnails(); ?>

Then the plugin should know by itself not to append to the_content. For parameter passing, or if something is not working, go read their APi or help files.

1
votes

You'll probably need to edit single.php or archive.php in your theme. If nothing is occuring there that looks familiar, it's probably using a loop. In which case you might find what you are looking for either in loop.php, loop-single.php, or loop-archive.php depending on what type of page you are on and how the theme was constructed. Add your button near where you find Read the rest of this entry...

With more information (such as what theme you are using), one might be able to help more as well.