Replace default the_post_thumbnail() with dynamic featured image
-
My theme uses function
the_post_thumbnail('featured',array('title' => ''));to display featured images in post loop. I would like to replace it with Dynamic image function, so I could display images from remote url.What code do I need to replace the_post_thumbnail() with dynamic featured image function?
IMO, it would be great feature for later plugin versions to have alternative for default WP the_post_thumbnail() 🙂Here is my theme post loop code.
<?php $j=0; $i =0; if (have_posts()) : while (have_posts()) : the_post(); ?> <article class="<?php echo 'pexcerpt'.$i++?> post excerpt <?php echo (++$j % 2 == 0) ? 'last' : ''; ?>"> <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>" rel="nofollow" id="featured-thumbnail"> <?php if ( has_post_thumbnail() ) { ?> <?php echo '<div class="featured-thumbnail">'; the_post_thumbnail('featured',array('title' => '')); echo '</div>'; ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Replace default the_post_thumbnail() with dynamic featured image’ is closed to new replies.