Support » Fixing WordPress » Loop for PAGES???

  • I need to show category page with list of pages (not post) in that category (i got a plugin for asigning categories to pages), but i do not know how to do loop for pages.
    this does not work:
    if (have_posts()) : while (have_posts()) : the_post();

    and something like have_pages afaik does not exist

Viewing 3 replies - 1 through 3 (of 3 total)
  • WordPress doesn’t allow Categories for Pages.

    Are you using some kind of plugin?

    yes I do, it simpy uses posts Categories (the same table structure). But it does has only function to show titles of pages from that category. But i guess it does not matter, it may be a question of how to show them for pages made in some month (archive) etc., the problem i got is about looping. The only function WP got for pages is probably wp_list_pages(), what is function to show links to pages, but not their excerpts.

    Moderator Samuel Wood (Otto)

    (@otto42) Admin

    If you want to put a loop in a page template, you need to call query_posts() to select the posts that you want to loop through first.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Loop for PAGES???’ is closed to new replies.