Home › Forums › Product Support Forums › Related Posts Pro for WordPress Support › Featured Images not Displaying and Random Order
- This topic has 20 replies, 2 voices, and was last updated 5 years, 9 months ago by
Ernest Marcinko.
-
AuthorPosts
-
May 13, 2020 at 4:49 pm #27300
DigitalTea15
ParticipantHi 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 #27324Ernest Marcinko
KeymasterHi,
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
May 14, 2020 at 2:44 pm #27338DigitalTea15
ParticipantHi 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 #27365Ernest Marcinko
KeymasterHi,
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.
May 18, 2020 at 10:12 pm #27428DigitalTea15
ParticipantHi 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 #27429Ernest Marcinko
KeymasterSure, let me know which post/posts aren’t working, and I will check.
May 19, 2020 at 4:22 pm #27438DigitalTea15
ParticipantHi 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 #27453Ernest Marcinko
KeymasterHi,
Thank you! I think the internal plugin cache is not cleared. Can you please try change these options: https://i.imgur.com/ZcTbdgk.png
It should very likely fix the issue.May 20, 2020 at 3:51 pm #27469DigitalTea15
ParticipantHi 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 #27481Ernest Marcinko
KeymasterYou cannot access this content.
May 21, 2020 at 6:45 pm #27496DigitalTea15
ParticipantYou cannot access this content.
May 26, 2020 at 7:25 pm #27570DigitalTea15
ParticipantHi Ernest, did you get my last reply?
May 27, 2020 at 9:22 am #27580Ernest Marcinko
KeymasterYou cannot access this content.
May 27, 2020 at 2:15 pm #27602DigitalTea15
ParticipantHi 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 #27623Ernest Marcinko
KeymasterThank 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.
-
AuthorPosts
- The forum ‘Related Posts Pro for WordPress Support’ is closed to new topics and replies.