Corneliatt
Forum Replies Created
-
Forum: Themes and Templates
In reply to: Page loop with one page with different templateOk cool! so I added an if statement to the loop.
if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <li> <?php if ( has_post_thumbnail() ) { the_post_thumbnail('medium'); }?> <h2><?php the_title(); ?></h2> <p><?php the_content(); ?></p> </li> <?php endwhile; endif; ?>The downside is that the neverending loading continues..
Soo annoying, and I don’t know what to do about it. Any other ideas maybe? :SForum: Themes and Templates
In reply to: Page loop with one page with different templateHi again!
Ok, so now I got it all to work with another script, and I just check if there’s any titles on the pages that matches the categories of the blog posts. If there are a match, the stuff loops out:<?php // The Query query_posts( array ( 'category_name' => $title, 'posts_per_page' => -1 ) ); // The Loop while ( have_posts() ) : the_post(); ?> <li> <?php if ( has_post_thumbnail() ) { the_post_thumbnail('medium'); }?> <h2><?php the_title(); ?></h2> <p><?php the_content(); ?></p> </li> <?php endwhile; // Reset Query wp_reset_query(); ?>So far, so good. The annoying thing is that the whole page never seem to be loaded completely. The loading icon in the browser window keeps on turning and turning. Weird, because I can’t see anything that’s missing.
Is there anybody who knows why it’s doing like this?
Thanks in advance!