Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other query_posts help

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #23898

    Hey there,

    I need some advice. I’m not sure if this the correct way I should be using query_posts but here goes.

    Whenever I submit a post under the category uevent it posts the title over in the sidebar. I did this by using <?php query_posts(‘cat=-4’); ?> in the main loop(i think it’s called) so it doesn’t get posted there at all. And I put this in my sidebar <?php query_posts(‘cat=4&showposts=5’); ?>

    So it lists the title of the 5 most recent posts filed in the uevent category.

    It works great, but I’ve tried to wrap a div around that query but it doesn’t work. When I check the source the div gets placed before the query.

    I try this:

    Code:

    This is the output:

    Code:
    [b]

    [/b]

    For me to add a div or a class do I need to feed it as an argument into that function?

    Hope you understand what I mean.

    TIA!

    #52763

    Problem is resolved now. It was just me being silly.

    I should of wrapped this instead:

    Code:
Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Other’ is closed to new topics and replies.