• Resolved joaoramos

    (@joaoramos)


    After commenting on one of my posts, WordPress redirects me to another random post. Only after, when checking the previous post, I can see that my comment was posted. Still, why is WordPress sending me to a random post after commenting?

    Here’s my comments.php file and here’s my website (please don’t publish it anywhere else, as I’m launching it tomorrow). Feel free to test the comments, though. I’ll clear then before I launch it.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Have you tried:

    – deactivating all plugins to see if this resolves the problem. If this works, re-activate the plugins one by one until you find the problematic plugin(s).

    – switching to the Twenty Ten theme to rule out any theme-specific problems.

    resetting the plugins folder by FTP or PhpMyAdmin. Sometimes, an apparently inactive plugin can still cause problems.

    – resetting your custom permalinks back to the default setting. If this works, then review Using_Permalinks before setting a custom permalink structure back up again.

    Thread Starter joaoramos

    (@joaoramos)

    Well, I’m not using plugins and the bug doesn’t actually happen when using other themes, so the problem is really on my side. I’ll try to reset the permalinks to see what happens. Is there any chances that this is being caused by my WordPress Multisite setup?

    I wouldn’t have thought so. It’s more likely to be plugin or theme related.

    Thread Starter joaoramos

    (@joaoramos)

    Oh, I just got it. I just taked my sidebar out of single.php and it works. I’m using two different WP_Query objects on my sidebar, so they’re probably messing around with the main loop, right? Here’s my sidebar file: do you know how to stop the two loops in the sidebar to mess with the main loop?

    Thread Starter joaoramos

    (@joaoramos)

    Oops, just solved my problem! All I had to do was to insert wp_reset_query(); at the end of my sidebar loops ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Random post after commenting?’ is closed to new replies.