
Let's say you have a blog and have posts ordered by their published date. Later you decide you want to pin certain posts.
Pinned posts should be displayed before any other posts regardless of their published date.
The Solution
You can accomplish this by modifying the order clause in the query.
Nulla nunc mi, pharetra sed dolor eu, porta finibus neque. Maecenas hendrerit pulvinar nisl, nec volutpat augue mollis sit amet. Nunc vestibulum, mi sit amet tincidunt mollis, tortor urna dignissim felis, fermentum mollis libero sapien eget odio. Donec nec libero in nibh mattis elementum.
1
1
Leave a comment