- This topic is empty.
Viewing 1 post (of 1 total)
-
AuthorPosts
-
October 24, 2014 at 12:31 am #186969RicodsParticipant
Hi,
I want to make a wordpress timeline and I have a problem with that. My code shows in two columns the same post. Any hints what I’ve got wrong?<?php $timelineLeft = 0; ?> <?php query_posts('cat=1'); while (have_posts()) : the_post(); ?> <?php if($timeline == 0) { ?> <?php if(has_post_thumbnail()) :?> <div id="timeline_left"> <div class="timeline_content animated bounceInLeft animation-delay-3"> <div class="timeline_box"> <p class="timeline_title"><?php the_title(); ?></p> <p class="timeline_date"><?php the_time('j.m.Y'); ?></p> </div> <div class="timeline_img"><?php the_post_thumbnail('small'); ?></div> <div class="timeline_text"><?php the_excerpt(''); ?> </div> </div> </div> <?php else :?> <div id="timeline_left"> <div class="timeline_content animated bounceInLeft animation-delay-3"> <div class="timeline_box"> <p class="timeline_title"><?php the_title(); ?></p> <p class="timeline_date"><?php the_time('j.m.Y'); ?></p> </div> <div class="timeline_text"><?php the_excerpt(''); ?> </div> </div> </div> <?php endif;?> <?php $timelineLeft = 1; }else{?> <?php $timelineLeft = 0; } ?> <?php if(has_post_thumbnail()) :?> <div id="timeline_right"> <div class="timeline_content animated bounceInRight animation-delay-5"> <div class="timeline_box"> <p class="timeline_title"><?php the_title(); ?></p> <p class="timeline_date"><?php the_time('j.m.Y'); ?></p> </div> <div class="timeline_img"><?php the_post_thumbnail('small'); ?></div> <div class="timeline_text"><?php the_excerpt(''); ?> </div> </div> </div> <?php else :?> <div id="timeline_right"> <div class="timeline_content animated bounceInRight animation-delay-5"> <div class="timeline_box"> <p class="timeline_title"><?php the_title(); ?></p> <p class="timeline_date"><?php the_time('j.m.Y'); ?></p> </div> <div class="timeline_text"><?php the_excerpt(''); ?> </div> </div> </div> <?php endif;?> <?php endwhile;?> <?php wp_reset_query(); ?>
-
AuthorPosts
Viewing 1 post (of 1 total)
- The forum ‘Back End’ is closed to new topics and replies.