Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter kalidotnet

    (@kalidotnet)

    It’s a standard WordPress install, installed to mysite.com/blog/ — everything works as expected there.

    The reason I’m not just using that page is because I really don’t care for any of the WordPress themes — basically, I’m wanting to use WordPress for the post-creating/backend functionality, and then use a few choice functions to output the posts as I prefer.

    (Creating my own WordPress theme seemed to be massive overkill when I could just put The_Loop into a [div] of my choosing.)

    That said, your quick fix worked perfectly. I’m using this now:

    `
    query_posts(‘cat=6’);

    if ( have_posts() )
    {
    while ( have_posts() )
    {
    the_post();
    /* etc. */
    }
    }
    `

    …and no longer need the in_category() checking.

    Since you mentioned this was an easy fix, is there a downside to this method, or another method that is more preferred?

    Thank you very much. I have a site again. 🙂

    Thread Starter kalidotnet

    (@kalidotnet)

    Er, that’s not a line of code. That’s a badly word-wrapped comment, as the text field is narrow and I cannot adjust font-size. 🙂 Apologies for the confusion.

    Here’s the snippet without those comments, and some attempt at indenting for clarity:

    if ( have_posts() )
    {
      while ( have_posts() )
      {
        the_post();
        if (in_category('6'))
        {
          /* assorted output functions here. */
        }
      }
    }

    I’m using the automated installation/upgrades that Dreamhost provides; it’s a little disheartening to think they’d botch it, but I’ll do some manual double-checking myself.

    Thread Starter kalidotnet

    (@kalidotnet)

    Additional information:

    The blog is installed to: mysite.com/blog/
    The page I’m working on is at: mysite.com/foo.php

    All the posts are displaying correctly at mysite.com/blog/.

    Some help would be greatly appreciated. Everything seems to be in perfect working order; I don’t understand why this code suddenly stopped working.

    Thanks. 🙂

Viewing 3 replies - 1 through 3 (of 3 total)