Home › Forums › Product Support Forums › Related Posts Pro for WordPress Support › Featured Images not Displaying and Random Order
This topic contains 20 replies, has 2 voices, and was last updated by Ernest Marcinko 2 years, 10 months ago.
- AuthorPosts
- May 13, 2020 at 4:49 pm #27300
Hi there!
A post was recently updated with a featured image, however the image is not appearing in the related posts.
Also, is there a way to randomize the posts being brought back?
May 14, 2020 at 1:14 pm #27324Hi,
The images are cropped and cached by default for better performance. This cache usually expires within 48 hours.
You can turn it off completely, with this configuration combination: https://i.imgur.com/fuUaBPy.pngYou can enabled override with random results: https://i.imgur.com/EE8bhL2.png
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
May 14, 2020 at 2:44 pm #27338Hi Ernest!
Thanks so much for the quick reply. I think we’ll stick with the caching. I can just explain it to the client 🙂
As for the random order, what we want to do is bring in the related relevant content, but potentially display the relevant content in a random order (instead of by relevancy). It seems like the opposite of relevancy when I type that, but basically the client doesn’t want the same related content in the same order on different pages within the same category 🙂
So if there is an order by hook or filter we can use to just randomize the already relevant results, that would be awesome.
Thanks and TTYS!
May 15, 2020 at 12:26 pm #27365Hi,
I’m afraid there isn’t any way, except for making direct modifications to the code. There are only filters for each individual items post-process, but that would not help in this case.
If you want, you can try a simple modification:
1. Open up the wp-content/plugins/related-posts-pro/includes/related_content.class.php file on the server
2. Go to line 1532, it should be a closing } parenthesis
3. After that line, put this:shuffle($this->posts);
.. so it should look like:$this->adv_content_field($this->posts[$key]->author, "authorfield", $this->advAuthorField, $post->id); // --------------------------------------------------------------- } shuffle($this->posts); } }
It could actually work.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
May 18, 2020 at 10:12 pm #27428Hi Ernest!
Thanks for the code tip – we are still having issues with the featured images for some posts not appearing. We’ve tried reassigning the featured images, but no go. Any ideas? I can provide exact details of the post and where it isn’t appearing.
TTYS!
May 19, 2020 at 7:39 am #27429Sure, let me know which post/posts aren’t working, and I will check.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
May 19, 2020 at 4:22 pm #27438Hi Ernest!
On the page: https://www.cfertech.com/infrastructure-equipment/ the Extreme Environments featured image isn’t showing up, even though a featured image has been selected.
TTYS!
May 20, 2020 at 12:42 pm #27453Hi,
Thank you! I think the internal plugin cache is not cleared. Can you please try change these options: https://i.imgur.com/ZcTbdgk.png
Best,
It should very likely fix the issue.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
May 20, 2020 at 3:51 pm #27469Hi Ernest!
I did try as you suggested, but no change – the featured image for the Extreme Environments is still not showing up 🙁
Any ideas?
May 21, 2020 at 9:29 am #27481You cannot access this content. Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
May 21, 2020 at 6:45 pm #27496You cannot access this content.May 26, 2020 at 7:25 pm #27570Hi Ernest, did you get my last reply?
May 27, 2020 at 9:22 am #27580You cannot access this content. Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
May 27, 2020 at 2:15 pm #27602Hi Ernest!
I thought something was up and you usually reply within 24 hours 🙂 No worries – that’s why I checked.
I’ve just whitelisted your IP address, so you should be good to go.
Thanks again!
May 28, 2020 at 12:23 pm #27623Thank you!
It was a combination of CDN cache and the file names. I have added a bypass to the image creator script, so that unique names are used each time a file is re-generated. The changes should be visible now – and the updated files should change after 8 hours tops.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
- AuthorPosts
You must be logged in to reply to this topic.