Forums

[resolved] I think I broke my comments, can I get some help? (5 posts)

  1. kitsunesniper
    Member
    Posted 1 year ago #

    So a while back I created my own theme, and it worked. I redesigned my site, and it worked fine - but for some reason, I couldn't get comments working on any of my pages. Now, I'm pretty sure this is something really silly but I can't make heads or tails outta this code (which I wrote myself!), so I would appreciate it if someone would help me understand it.

    All I know is that I copied and pasted stuff from my earlier theme (which still works) and now it doesn't.

    All of this is within the loop. The header / sidebar / footer code works perfectly.

    http://wordpress.pastebin.com/pAU5R9XM

    If you have any questions or suggestions on how to clean this up, lemme know. Thanks for any help!

  2. Samuel B
    moderator
    Posted 1 year ago #

  3. kitsunesniper
    Member
    Posted 1 year ago #

    That doesn't work; it break the site with a PHP error.

    Can you write '<?php' functions -inside- '<?php' functions?

  4. New Nine Media
    Member
    Posted 1 year ago #

    Samuel B had the right fix. You can't open a <?php tag inside of an already open <?php tag. That's why he removed it from Line 36. Now, we need to find that other error. What exactly was the PHP error you saw?

  5. kitsunesniper
    Member
    Posted 1 year ago #

    Okay, I fixed it. The problem was in single.php. I didn't realize what was wrong until I read the Template Hierarchies topic in the Codex; single.php was -overriding- my index.php file, so any changes I made to it were being ignored.

    See folks, this is why you READ stuff instead of being a moron like me!

    Sorry.

    ETA: New Nine Media, I tried the fix but the site showed me an 'unexpected <?php' error. Like I said, I have no idea what I'm doing here. Aheh.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.