Wordpress sidebar appearing below the content on the wp-property property listing pages.This problem was only happening on the pages used to list the details of individual properties; I didn't notice it happening anywhere else. On all other pages on the property website I was working on showed the sidebar where it should be: beside the content. One the property detail pages the sidebar was appearing below the content and the part of the layout where the sidebar should be was just a big white space. I was stuck. I called in the services of a CSS guru who tried many things and resorted to saying bad words out loud to the pages of code we were looking at. Then we fixed it very easily; here's how.
How to fix the sidebar being displayed below the content in the wp-property Wordpress plugin:
- Copy the file property.php from wp-content/plugins/wp-property/templates and save it to the root folder of your child theme. If you don't have a child theme then make a copy of template.php and then hack at the file in-situ. I would recommend creating a child theme first, here's how...
- At the bottom of your new copy of property.php add two DIV close tags (highlighted below) just above the property type sidebar code.
So how did we find this fix? We decided to run the (live) page we were having trouble with through the W3C code validator and found that it failed. Adding the two DIV close tags fixed the validation errors and put the sidebar where it should be - on the side of the content.
I am a little disappointed that a great plugin like wp-property would appear to have a rudimentary code error like this, but hey, pobody's nerfect.