简体   繁体   English

添加后,边栏将移动到内容下方<?php the_content(); ?>

[英]Sidebar gets moved below content after adding <?php the_content(); ?>

I'm currently working on a site and I'm also new to coding WordPress, so I decided to follow some tutorials. 我目前在一个网站上工作,并且对WordPress编码也很陌生,所以我决定遵循一些教程。 After placing in the code, the sidebar gets moved below the content and I'm not sure what I'm doing wrong as everything was fine before I had added that snippet. 放置代码后,边栏将移至内容下方,我不确定自己做错了什么,因为在添加该代码段之前一​​切都很好。

Any help would be greatly appreciated! 任何帮助将不胜感激!

http://samplr.paulvictor.nl/demo/ http://samplr.paulvictor.nl/demo/

EDIT #2 编辑#2

I can't post the code, I don't know how to use those backticks. 我无法发布代码,也不知道如何使用这些反引号。

EDIT #3 编辑#3

Here's the screenshot: 这是屏幕截图:

http://i.stack.imgur.com/4GwhE.jpg http://i.stack.imgur.com/4GwhE.jpg

It's because your sidebar is currently printed inside the div with a class of blog_post. 这是因为您的侧边栏当前已在div内以类blog_post进行打印。 Move it outside of that should fix your problem 将其移出该范围即可解决您的问题

Hope this helps :) 希望这可以帮助 :)

Fix some code errors, like the ul tags around <div class="menu"> and a missing closing </div> . 修复了一些代码错误,例如<div class="menu">周围的ul标签和缺少的</div> Out of place and missing div tags are the leading cause of sidebar problems in Wordpress. 位置不正确和div标签缺失是Wordpress中侧边栏问题的主要原因。

See [Invalid] Markup Validation of samplr.paulvictor.nl demo - W3C Markup Validator . 请参见samplr.paulvictor.nl演示的[无效]标记验证-W3C标记验证器 Scroll down in the validation report to see line numbers and source code. 在验证报告中向下滚动以查看行号和源代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM