Category  »  Post

PowenKo, WordPress Tutorial 30, category, Find the post is “homepage”, and get it’s category , to display 5 post of content

November 26, 2011   ·   0 Comments

Find the post is “homepage”, and get it’s category , to display 5 post of content


  $cat=get_cat_ID("homepage"); 
  $postsaa = get_posts("cat=$cat&showposts=5");
  if ($posts) {
    foreach ($postsaa as $postaa):
      setup_postdata($postaa); 
    the_content();
	endforeach;
  }

shareShare on FacebookShare on Google+Share on LinkedInEmail this to someonePrint this pageBuffer this pageDigg thisFlattr the authorShare on RedditPin on PinterestShare on StumbleUponShare on TumblrTweet about this on Twitter

By


Readers Comments (0)


You must be logged in to post a comment.

PowenKo’s Online Store

powenko_arduinoBook
Wordpress99

Wordpress

Amazon

adsbygoogle

Recent Posts

Categories

Amazon