I am displaying category and all its posta in my top navigation using below code for the post:-
$arguments = array('category' => 3 , 'order' => 'ASC', );
$posts = get_posts($arguments); ?>
foreach($posts as $post)
{
setup_postdata($post); ?>
<li><a href="#"> <?php the_title(); ?></li>
But when i do this my all static pages include home will not display their contents and display only a post from that category .
Do you tried wp_reset_query.try wp_reset_query after foreach
edit:-
use query post instant of get_posts
wp_reset_postdata will reset your post data.this query will not affect your other pages