single.php is acting weird
-
this is the original nav-above code from single.php:
<div id="nav-above" class="navigation"> <div class="nav-previous"><?php previous_post_link( '%link', '<span class="meta-nav">' . _x( '←', 'Previous post link', 'twentyten' ) . '</span> %title' ); ?></div> <div class="nav-next"><?php next_post_link( '%link', '%title <span class="meta-nav">' . _x( '→', 'Next post link', 'twentyten' ) . '</span>' ); ?></div> </div><!-- #nav-above -->and this is what you made out of it (or what appears in the html code in the browser:
<div id="nav-above" class="navigation"> </div> </div><!-- #nav-above -->as you can see, there is an unbalanced
</div>in it, which causes part of your problem.remove this
</div>, or if you don’t want the next/prev post navigation at all, remove the whole code.the same with the nav-below code.
this is only part of the problem, because when you remove these extra
</div>, the content will go back to normal, but the sidebar will be below the content.
there are now two closing divs missing before the call of the sidebar (and i can’t see yet where these should be).can you paste the code of single.php into a http://wordpress.pastebin.com/ and post the link to it here?
do you remember having modified other templates as well?
comments.php?independant from all this:
it is not advised to modify Twenty Ten directly, as this is the default theme of wp3 and will be overwritten with the next update of wordpress; and all your modifications will be lost.
Strongly consider creating a child theme: http://codex.ww.wp.xz.cn/Child_Themesand make regular backup copies of your theme and database
Cheers. I’m really new at this so yea :p Don’t think i tempered with the comments.php, not sure tho.
Will definatly create a child theme now that i know.
Link to code of single.php -> http://wordpress.pastebin.com/bJWthYEw
I’ve read about how to make a child theme now, but i’m still clueless =/ My english isn’t very good, but not extremly bad either, but i really don’t understand how to create it, and what to write where and when :<
http://wordpress.pastebin.com/mH5TPufA
this is single.php repaired:
these are the changes areas (corrected shown below):
<div id="nav-above" class="navigation"> </div><!-- #nav-above --></div><!-- .entry-utility --><div id="nav-below" class="navigation"> </div><!-- #nav-below -->and then edit style.css:
#respond input { float:left; margin: 0 0 9px; width: 75%; } #respond textarea { width: 75%; }change the
width: 75%;in both styles towidth: 98%;good luck 😉
Thanks a million 😀
The topic ‘single.php is acting weird’ is closed to new replies.
(@nocic87)
15 years, 4 months ago
Hi.
On every single post, the text blends into the sidebar. On the frontpage it looks ok. Also the comment box looks really…wrong. I don’t know how to fix this, I don’t even know how i made it so >.<
link to a single post: http://nocic.se/?p=481
Can someone please help me? I’ve not too familiar with this yet, but i’m learning.