Dynamic Drive: ajaxtabscontent inaction (Single Page)


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" />
  2.  
  3. <style type="text/css">
  4. #events-home { display:none; }
  5. </style>
  6.  
  7. <!-- Next: shows the excerpt in the home page -->
  8.  
  9. <div id="events-home">
  10. <div class="event-home-post">
  11. <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
  12.  
  13. <div <?php post_class() ?> id="post-<?php the_ID(); ?>">
  14.  
  15. <h4><?php the_title(); ?></h4>
  16. <div class="entry">
  17. <?php the_excerpt_rss(); ?>
  18. </div>
  19. </div>
  20.  
  21. <a href="<?php the_permalink() ?>" class="event-home-post-more">More..</a>
  22.  
  23. <?php endwhile; endif; ?>
  24. </div>
  25. </div>
  26.  
  27. <!-- Next: appears in single page & events page -->
  28.  
  29.  
  30. <div id="events-single">
  31. <div class="event-home-post">
  32. <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
  33.  
  34. <div <?php post_class() ?> id="post-<?php the_ID(); ?>">
  35.  
  36. <!--<h4><?php the_title(); ?></h4>-->
  37. <div class="entry">
  38. <?php the_content(); ?>
  39. </div>
  40. </div>
  41.  
  42.  
  43. <?php endwhile; endif; ?>
  44. </div>
  45. </div>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.