/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<div id="events-index"> <h4>Latest events</h4> <ul id="events-list"> <?php query_posts( 'cat=3&posts_per_page=3' ); ?> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <li> <a href="<?php the_permalink() ?>" rel="countrycontainer"> <?php the_post_thumbnail('home-widget'); ?> </a> </li> <?php endwhile; ?> <?php wp_reset_query(); // Reset Query ?> <?php endif; ?> <div class="clear"></div> </ul> <div id="event-details"></div> <script type="text/javascript"> var countries=new ddajaxtabs("events-list", "event-details") countries.setpersist(true) countries.setselectedClassTarget("link") //"link" or "linkparent" countries.init() </script>