WordPress.org

Forums

The loop not working (4 posts)

  1. Missychele
    Member
    Posted 10 years ago #

    Okay, The loop seems rather simple. Just a simple copy and paste. But, somehow it's not working for me and I can't find any documention on it anywhere that describes how it can be used. I'm trying to put it into an html document. Will it not work with html? Is there a "How to" for The Loop?

  2. NuclearMoose
    Member
    Posted 10 years ago #

    Missychele,

    Not sure if you have checked out http://codex.wordpress.org/The_Loop yet. That said, it is currently being revised to help provide more information than it currently does.

    Now, as to it "not working" are you saying that you are getting absolutely nothing at all, or is there an error message of some kind or what? Perhaps you need to use an include statement or two to pull in the information you require.

    The Loop is essentially the WordPress engine, but you may need to have other code there to tell the engine what to do. Having the loop included in your page is the first and most important step. Now that it is there, you must put it to work.

    There are others around here who are much better suited to explain this than I. My best advice is to also take a look at the template tag pages in Codex as well. In there, you will see tags that will only run if they are within the loop, and many of those tags are related to posts and comments.

    Not a complete answer, but I hope it gives you a starting point.

  3. tblob
    Member
    Posted 10 years ago #

    When I went to look at that URL http://codex.wordpress.org/The_Loop, I got this:

    A database error has occurred
    Query: INSERT INTO objectcache (keyname,value,exptime) VALUES('codex:messages:Sitenotice','+?2?RR?','2005-02-05 19:56:08')
    Function: MediaWikiBagOStuff:_doquery
    Error: 1062 Duplicate entry 'codex:messages:Sitenotice' for key 1 (localhost)

    Backtrace:

    Database.php line 345 calls wfDebugDieBacktrace()
    Database.php line 297 calls DatabaseMysql::reportQueryError()
    ObjectCache.php line 369 calls DatabaseMysql::query()
    ObjectCache.php line 278 calls MediaWikiBagOStuff::_doquery()
    ObjectCache.php line 254 calls MediaWikiBagOStuff::_query()
    MessageCache.php line 269 calls MediaWikiBagOStuff::set()
    GlobalFunctions.php line 392 calls MessageCache::get()
    GlobalFunctions.php line 338 calls wfMsgReal()
    Setup.php line 372 calls wfMsg()
    index.php line 25 calls require_once()

  4. The Loop page is now working correctly.

    http://codex.wordpress.org/The_Loop

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags