Following on from the tutorial on how to visually build adjacent post links with the repeater component. In this members-only tutorial we'll go through adding a custom condition that allows us add elements based on if the post is either the previous or next post.
An example use case for this is if we wanted to be able to add different icons for arrows, where they will need to be different in each post. We could also use this to add different labels.
In our code snippets, the php to add the custom condition is the following;