Featured Images not Displaying and Random Order

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 Ernest Marcinko 2 years, 1 month ago.

Viewing 15 posts - 1 through 15 (of 21 total)
  • Author
    Posts
  • #27300
    DigitalTea15
    DigitalTea15
    Participant

    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?

    #27324
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    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.png

    You 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 :)


    #27338
    DigitalTea15
    DigitalTea15
    Participant

    Hi 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!

    #27365
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    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 :)


    #27428
    DigitalTea15
    DigitalTea15
    Participant

    Hi 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!

    #27429
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Sure, 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 :)


    #27438
    DigitalTea15
    DigitalTea15
    Participant

    Hi 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!

    #27453
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    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.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #27469
    DigitalTea15
    DigitalTea15
    Participant

    Hi Ernest!

    I did try as you suggested, but no change – the featured image for the Extreme Environments is still not showing up πŸ™

    Any ideas?

    #27481
    Ernest Marcinko
    Ernest Marcinko
    Keymaster
    You cannot access this content. Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #27496
    DigitalTea15
    DigitalTea15
    Participant
    You cannot access this content.
    #27570
    DigitalTea15
    DigitalTea15
    Participant

    Hi Ernest, did you get my last reply?

    #27580
    Ernest Marcinko
    Ernest Marcinko
    Keymaster
    You cannot access this content. Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #27602
    DigitalTea15
    DigitalTea15
    Participant

    Hi 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!

    #27623
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Thank 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 :)


Viewing 15 posts - 1 through 15 (of 21 total)

You must be logged in to reply to this topic.