• Resolved mtemp

    (@mtemp)


    Hello,

    I implemented WP in an existing homepage to output articles on 2 pages (root and submenu/subfolder) with such an array:

    $posts = get_posts(array(
    	"numberposts" => 5,
    	"order" => DESC,
    	"orderby" => post_title)
    );

    … then the loop:

    foreach ($posts as $post):
    	the_post();
    	the_title();
    endforeach;

    But is it possible to use the same construct for showing only 1 specific article?

    Thanks, Carlos

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Show only 1 article with get_posts()?’ is closed to new replies.