0

I am having an odd issue where my sidebar is stuck aligned with the first post on my page chronologically instead of appearing at the top of my page ie. I have two posts and the second post(being the most recent) appears at the top yet the sidebar aligns with the first post which is located further down the page.

When I have had this issue previously it has meant the sidebar has appeared down the bottom due to invalid markup however I have not come across this issue before. Any help or suggestions would be greatly appreciated.

You can see this issue here On My Site It's still in it's infancy.

Thanks

3 Answers 3

1

I seem to have fixed this issue by calling <?php get_sidebar(); ?> before the loop as opposed to after which seems to have fixed the issue. Not sure if this is technically the correct way to do things however this seems to have fixed my issue.

2
  • you should accept your answer as it solved your problem.
    – Chris_O
    Commented Apr 6, 2011 at 8:58
  • 1
    My first instinct was that you've got an improperly closed container somewhere. If not that, and moving the get_sidebar() call before the Loop resolved the issue, then you're problem is almost entirely CSS-related. Commented Jun 6, 2011 at 1:09
0

footer tag is not getting cleared properly for some reason (add something to it - it goes to where sidebar should be). Not sure why, hadn't used HTML5 markup yet.

Also I must note that this is not really question specific to WordPress and you might get better answers on one of other StackExchange sites.

2
  • I checked the footer and rolled back to XHTML replacing the HTML5 tags with div's etc and made sure everything is correctly formatted and valid to no avail. I have checked my CSS etc and this issue still persists. However if this is the wrong forum for this question I can take it to another StackExchange site however it seems to only affect this WordPress installation hence why I posted here. Commented Mar 7, 2011 at 10:32
  • I seem to have fixed this issue by calling <?php get_sidebar(); ?> before the loop as opposed to after which seems to have fixed the issue. Not sure if this is technically the correct way to do things however this seems to have fixed my issue. Commented Mar 7, 2011 at 11:34
0

looks more like a CSS issue to me then a wordpress issue. Check your HTML code, it looks pretty valid to me meaning that the sidebar is displayed where it should be displayed. If you need to run it over the whole page you must place it somewhere else.

You probably want to learn more about HTML and CSS first to better understand what is happening when the browser loads and displays your page.

Therefore you can save your page as HTML with all files (stylesheets and images), every modern browser has such a functionality. Then you can open that file from disk in your browser and in an editor and you can play around with the markup and stylesheets.

Then you can re-order HTML elements and change styles until you achieved the layout you wanted.

The only thing left then is to apply those changes to your wordpress theme then.

If you're totally clueless, I suggest making use of a framework like YAML (Yet Another Multicolumn Layout) which has a builder and I think there is a YAML based wordpress theme. Mind the license, it's not GPL but under CC.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.