Posts page not showing correct image

admin2025-06-02  1

The Wordpress site I am working on has a static front page, and all posts are sent to another page (entitled blog).

The images on this Posts page are random pretty shots, and not in the Media collection at all. When I click on a post however, I do get the correct image in its new page.

How can I either get the correct image in the Posts page, or remove these images from the Posts page entirely?

Wordpress is version 5.1, and the theme is something called Simple Business Pro. Thank you!

The Wordpress site I am working on has a static front page, and all posts are sent to another page (entitled blog).

The images on this Posts page are random pretty shots, and not in the Media collection at all. When I click on a post however, I do get the correct image in its new page.

How can I either get the correct image in the Posts page, or remove these images from the Posts page entirely?

Wordpress is version 5.1, and the theme is something called Simple Business Pro. Thank you!

Share Improve this question asked Feb 27, 2019 at 21:52 cocococo 1033 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

If the theme you're using is this: https://wordpress/themes/simple-business-wp/, then... This is the code responsible for images on the blog page:

<?php
if (has_post_thumbnail()) {
    the_post_thumbnail('nimbus_722_400', array('class' => 'nimbus_722_400 img-responsive'));
} else { ?>
    <?php if ( (simple_business_wp_get_option('fp-news-thumbs-toggle') == "1") || (simple_business_wp_get_option('fp-news-thumbs-toggle') == "") ) { ?>
        <img src="<?php echo get_template_directory_uri(); ?>/assets/images/preview/722x400-<?php echo rand(1,8); ?>.jpeg" class="nimbus_722_400 img-responsive" alt="<?php the_title(); ?>" />
    <?php } ?>
<?php } ?>

As you can see, it will show post thumbnail, if it is set. And if there is no thumbnail set and some option is set to true, then it will show random image from assets.

So if you're seeing some random images on the blog list, then probably you haven't set featured images for these posts.

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1748856455a314290.html

最新回复(0)