/ Published in: PHP

Get posts from a Custom Post Type
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php while ( $loop->have_posts() ) : $loop->the_post(); ?> <div class="vehicle_repeater"> <a href="<?php echo get_permalink(); ?>"><?php echo get_the_post_thumbnail($page->ID, ''); ?></a> <div class="vehicle_text_box"> <?php the_title( '<h4><a href="' . get_permalink() . '" title="' . the_title_attribute( 'echo=0' ) . '" rel="bookmark">', '</a></h4>' ); ?> <p class="vehicle_small_text"> <?php $myExcerpt = get_the_excerpt(); if ($myExcerpt != '') { // Some string manipulation performed } echo $myExcerpt; // Outputs the processed value to the page ?> </p> </div> </div> <?php endwhile; ?>
Comments
