[Solved] I want to make a call in php that will create an for each post? [closed]


As per the wordpress documentation. This should get you started:

<ul>
<?php
$args = array( 'posts_per_page' => 5, 'offset'=> 1, 'category' => 1 );

$myposts = get_posts( $args );
foreach ( $myposts as $post ) : setup_postdata( $post ); ?>
<li>
    <a href="https://stackoverflow.com/questions/21582661/<?php the_permalink(); ?>"><?php the_title(); ?></a>
</li>
<?php endforeach; 
wp_reset_postdata();?>

</ul>

And for further reference: http://codex.wordpress.org/Template_Tags/get_posts#Posts_list_with_offset

0

solved I want to make a call in php that will create an

  • for each post? [closed]