$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>Posts page not showing correct image|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

Posts page not showing correct image

matteradmin8PV0评论

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.

Articles related to this article

Post a comment

comment list (0)

  1. No comments so far