WordPress.org

Ready to get started?Download WordPress

Forums

Non-wp db call confuses the Loop (3 posts)

  1. Matt
    Member
    Posted 5 years ago #

    I’m calling this script that retrieves rows from some forums tables from the header in WP, but below — when it’s time to get the WP post — WP gets confused and throws up a
    “Not Found
    Sorry, but you are looking for something that isn’t here.”

    WP tables and phpBB3 tables are in the same db, with different prefixes of course.

    I thought it was a variable collision, so I changed all variables in the script from $query to $latestpostsquery, $row to $latestpostsrow, etc. Still not working. Any ideas?

    The script works fine in the WP footer.

  2. MichaelH
    Member
    Posted 5 years ago #

    Did you try using a new WP_Query as exemplified in this article:
    http://weblogtoolscollection.com/archives/2008/04/19/paging-and-custom-wordpress-loops/

  3. Matt
    Member
    Posted 5 years ago #

    Thanks for the link. Before I dug into that, I played around with my script.

    Turns out if it was a php function, it would cause the problem I stated above. But If I take out the function wrapper around it, it runs fine :-s

    So I'm leaving it alone, and I'm getting by without it being a function.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.