/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" /> <style type="text/css"> #events-home { display:none; } </style> <!-- Next: shows the excerpt in the home page --> <div id="events-home"> <div class="event-home-post"> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div <?php post_class() ?> id="post-<?php the_ID(); ?>"> <h4><?php the_title(); ?></h4> <div class="entry"> <?php the_excerpt_rss(); ?> </div> </div> <a href="<?php the_permalink() ?>" class="event-home-post-more">More..</a> <?php endwhile; endif; ?> </div> </div> <!-- Next: appears in single page & events page --> <div id="events-single"> <div class="event-home-post"> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div <?php post_class() ?> id="post-<?php the_ID(); ?>"> <!--<h4><?php the_title(); ?></h4>--> <div class="entry"> <?php the_content(); ?> </div> </div> <?php endwhile; endif; ?> </div> </div>