Peta situs

Author(s):

Pages:

Posts:

    ‘.”\n”.’

    Category: ‘.$cat->cat_name.’

    ‘.”\n”;
    echo ‘

      ‘.”\n”;

      //http://codex.wordpress.org/Function_Reference/query_posts
      query_posts(‘posts_per_page=-1&cat=’.$cat->cat_ID); //-1 shows all posts per category. 1 to show most recent post.

      //http://us3.php.net/while ; http://codex.wordpress.org/The_Loop ; http://codex.wordpress.org/The_Loop_in_Action
      //http://codex.wordpress.org/Function_Reference/the_time ; http://codex.wordpress.org/Function_Reference/the_permalink
      //http://codex.wordpress.org/Function_Reference/the_title ; http://codex.wordpress.org/Function_Reference/comments_number
      while(have_posts()): the_post();
      //http://codex.wordpress.org/Function_Reference/get_the_category
      $category = get_the_category();
      //Display a post once, even if it is in multiple categories/subcategories. Lists the post in the first Category displayed.
      if ($category[0]->cat_ID == $cat->cat_ID) {?>

    • »

Tinggalkan Balasan

Alamat surel Anda tidak akan dipublikasikan. Ruas yang wajib ditandai *