[wp-hackers] wordpress loop help

Filippo Pisano filippo.pisano at gmail.com
Wed Apr 17 07:30:59 UTC 2013


It depends on how you use loops inside your page. How many loops do you
have in your page?
Are you using wp_reset_query() before opening the second loop inside your
page?



Filippo Pisano
cel: 3291821355 / skype: filippopisano


On Wed, Apr 17, 2013 at 9:23 AM, Saša Pršir <sashaprsheer at gmail.com> wrote:

> I am having trouble with my wordpress loop. It pulls out the pages instead
> posts. I have three posts(My first post,My second post, My third post) and
> three pages(home, about, contact)... and when i do this
>
> <div id="primary">
>
>                 <?php if (have_posts()) : while(have_posts()) : the_post()
> ; ?>
>
>                 <div class="post-item">
>                     <img src="<?php echo bloginfo('template_directory') .
> '/img/postImages/one.jpg'; ?>" alt="post image" />
>                     <h2><a href="<?php the_permalink() ?>"><?php
> the_title(); ?></a></h2>
>                     <p class="meta">4/1/09 in Inspiration</p>
>                     <p>
>                         Lorem ipsum dolor sit amet, sit diam ut sed jus
> consequat nunc incassum fatua,
>                         sed genitus, virtus, saepius pagus. Autem bene
> ingenium aptent aliquam inhibeo,
>                         accumsan nonummy proprius pneum reprobo letalis
> vindico duis elit.
>                     </p>
>                 </div> <!-- end post-item -->
>
>                 <?php endwhile; ?>
>                 <?php else : ?>
>
>                 <p>I'm not sure what you're looking for.</p>
>
>                 <?php endif; ?>
>
>                 <a href="#" class="more">More...</a>
>
>             </div><!-- end primary -->
>
> it takes out pages title?
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


More information about the wp-hackers mailing list