Give help. Get help.

  • # January 6, 2009 at 2:40 pm

    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:

    < ?php query_posts('cat=4&showposts=5'); ?>

    This is the output:



    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.


    # January 6, 2009 at 7:27 pm

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

    I should of wrapped this instead:

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.