Need help related to my codeigniter wallpaper script |
Hi again!
In the past months i understand a lot CI working mechanism and i like it a lot. But now for the past 3 hours I can't find a solution for this problem: PHP Code: <?php foreach ($categories as $k => $cat) { ?> This line of codeĀ <img src="<?php echo $this->image_workshop->crop_image(ORIGINALS_FOLDER_WF . '/' . $cat->wallpaper_image_path, 400, 225, $cat->wallpaper_crop_position, 'thumbnail'); ?>" alt="<?php echo $cat->category_name; ?>"/> generates my thumbnails in this page https://uhdwallpapers.org/categories/ and what i need is to make it to choose the newest thumbnail not the 1st that was published when the category was created. Can someone tell me how to modify the code to choose the newest thumbnail for every category? (i guess it is something related to order by or reverse for foreach, but i don't know how to implement) Thank you! |
Welcome Guest, Not a member yet? Register Sign In |