I have been going crazy trying to figure this out and the theme developer is absolutely no help. Waited a week for him to say he wouldn't help.
I have this code:
|
PHP Code:
|
<?php
$loop = new WP_Query( array( 'post_type' => 'post', 'posts_per_page' => 6, 'paged' => $paged ) );
echo '<div id="ajax-container"><div id="ajax-inner">';
while ( $loop->have_posts() ) : $loop->the_post(); ?>
<div class="blog-post">
<div class="featuredImageHolder">
<?php if ( has_post_thumbnail() ) the_post_thumbnail( 'full', array( 'class' => "featuredImage", ) ); ?>
<div class="justBlogHolder">
<div class="blog_title">
<h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
<p class="blog_excerpt"><?php echo the_excerpt(); ?></p>
<a class="blog-icon" href="<?php the_permalink(); ?>"> Read More » </a>
</div>
</div>
<div class="blog_metainfo">
</div>
</div>
</div>
<?php endwhile; ?>
|
That code shows a large image(featured image) on the archive page of the blog, with the title and an excerpt overlay for each post.
I need to know what I can change to make it grab just the title (and the excerpt if possible) if there is no featured image chosen.
The blog was moved from blogger so all images are in the posts (over 300 of them) but none are considered "attached" in WP.
We are slowly going through adding the featured images but need this workaround while we do.
Thanks,
~C