Jump to content

Want to position/float a block/table inside a content section in Wordpress


Recommended Posts



I use Wordpress, and I am trying to find a way to float a table (or anything) inside the content area. The table will have to come before or after the content itself, but then be positioned in a fixed place within the content.


I tried using negative margin (placing table below content) , and got it to move up, but could not get the text to wrap around (the table was on top of the text).


I tried to add a positive margin (placing table above content) but could not get the text to wrap above the table.


I looked into using indents for the table, but I failed with that.


If you are familiar with Wordpress, then I am specifically trying to get a "similar posts" list inside the content.


This is what the single.php template file looks like (part of) with the table I want within the content shown below:


<?php the_content(); ?>

<TABLE class="inside">
<?php similar_posts(); ?>


I am aiming to get the list to appear on the left hand side, about half way down an average page. I also tried vertical align middle in the css. But if I can get it always a specific number of px that would be fine too.


I am sure it is possible. I have searched/trawled the net in the hope to find a page that does it already, and failed.

Link to comment
Share on other sites

It seems to me that you are asking if you can move the similar post to visually located within the content area of the page and not at the bottom or after the content. Intead of tables, you can use a div and positioning with css but I don't think you will be able to get the content text to cooperate in which it will wrap around the similar post div.


You may need to find another plugin that will allow you to integrate to the content so it behaves accordingly.


Do you have the site live? It might helps us determine what you are trying to achieve and maybe a screen shot of how you want your similar post to be located at.

Link to comment
Share on other sites

THe site is alive and well. Testing in one section.


Currently I am using a plugin that inserts content after a specific number of paragraphs (line breaks).


I have now come across another that involves modifying single.php and that may allow php inside, to allow similar_posts. Hoping that this will allow me to use the php bit: http://www.internoetics.com/2010/02/08/adsense-code-within-content/


Currently just got some static content there.

Link to comment
Share on other sites

Yeah, Colchester not far from me, my nan lived there for a bit.


Decided to continue to use the plugin that does work. Cannot display the content I want, but hoping the plugin writer, or another person skilled with Wordpress, will be able to come up with a solution. For now I have a working solution, or sorts. Static most popular list in the table. Not ideal, but better than nothing.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...