CMoore Posted March 10, 2024 at 10:11 PM Share Posted March 10, 2024 at 10:11 PM (edited) I have been asked by a few how I was able to create a filter that changes the order so that the featured listings are randomized and then display the rest in alphabetical order. Please note that this is going to slow down your load time and puts some stress on the server. You will want to be selective with how you use this. I am uploading a copy of the filter, I have also added in more notes to get things started. Read through the notes on the document, they will guide you through the first few steps. Then, you will need to upload the attached "featured_random.php" file to jreviews_overrides/filters Next, you need to call this filter for use by creating a filter_functions.php file with this: <?php defined('MVC_FRAMEWORK') or die; require 'featured_random.php'; Place this filter_functions.php file into the same /filters folder. You may notice that your featured listings initially disappear, that is because they have no value. In order to start the script, run your cron script manually (just click on your cron script link), you should get a success message. You should see your featured listings at this point. If your page's featured listings don't shuffle order on their own after this then check your cron script. This code works for me but can't guarantee that it will work for you. Make sure to take a full server backup before you begin since the first step has you modifying your database. Use this code at your own risk, what worked for me may not work for you. Good Luck! filter_functions.php Edited March 10, 2024 at 10:12 PM by CMoore n00bster, Alejandro and AdinaG 1 2 Link to comment
Alejandro Posted March 11, 2024 at 01:18 AM Share Posted March 11, 2024 at 01:18 AM This section is only visible with a valid subscription. If you have a valid subscription, please login. Link to comment
CMoore Posted March 11, 2024 at 11:02 AM Author Share Posted March 11, 2024 at 11:02 AM This section is only visible with a valid subscription. If you have a valid subscription, please login. AdinaG 1 Link to comment
Alejandro Posted March 11, 2024 at 11:27 AM Share Posted March 11, 2024 at 11:27 AM This section is only visible with a valid subscription. If you have a valid subscription, please login. Link to comment
AdinaG Posted September 3, 2024 at 02:23 PM Share Posted September 3, 2024 at 02:23 PM This section is only visible with a valid subscription. If you have a valid subscription, please login. Link to comment
Recommended Posts