Support » Plugins » Is there anything like “post pool” for the wp Loop?

  • Hi guys 🙂

    My first post here. Im newbie in wordpress, kinda post-newbie in PHP 🙂 (i programmed a social networking engine not long ago).

    I have a question.

    I have read the codex but i still dont really understand how the wp loop works.

    How can i give a query to the wp loop? I mean by default it just calls have_posts(), innit? But where is the part which tells the loop to list posts by a certain criteria?

    If i have a complex self written mysql query how can i list that query with the default archive wp loop? Cause i dont want to mess up the code.

    I just want to do

    if (is_category(‘MySpecialCat’)
    give the loop my special query to list
    do the usual.

    I hope its understandable, english isnt my native language and i havea messed-up thinking anyway.

    Thanks for understanding. Cheers.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Do you mean something like:

       'category__in' => array(2,109,165)

    yep since then i found the query_posts codex page :-D.

    but for me its not working, at least never the way i want.
    lets say i have got a custom field called “datum” (means date).

    i didnt put dates into it but integers for test first.
    here is what i did:

    if (is_category('Uncategorized'));

    should it work? cause it does not.

    thanks for your attention.

    ahha! i think i read sg like this before here on the forum:

    the ordering is not working properly. it orders about the half of the posts but every time a value pops in here and there…

    any ideas?

    okay i found it! the wp meta_value is a longtext type but i try to compare integers. any way to change its type tru query_posts() ?

    i found a not too pretty workaround but im still interested in how can i define the type of the custom field.

    ehh sorry, i was talkin bollox, forget it :S.


Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Is there anything like “post pool” for the wp Loop?’ is closed to new replies.