This members-only tutorial provides the steps to output 3 (manually) related or associated posts for a Page set via ACF Relationship Field such that the first one has a different HTML output compared to the other two.
![](https://wpdevdesign.com/wp-content/uploads/2022/04/acf-relationship-custom-grid-1024x506.jpg)
Step 1
Create a field group having a Relationship type of custom field.
![](https://wpdevdesign.com/wp-content/uploads/2022/04/page-fields-group-acf-relationship-field-921x1024.png)
Step 2
Edit your Pages and select the associated Posts for each.
![](https://wpdevdesign.com/wp-content/uploads/2022/04/CleanShot-2022-04-13-at-21.38.52@2x-1024x388.png)
Step 3
Let's define a custom function that outputs the excerpt given a post ID in the specified length.
Install and activate Code Snippets plugin.
Go to Snippets > Add New.
Title: Custom excerpt length
Code:
This is a premium members-only content.
To view the rest of the content, please sign up for membership ($47/month or $599 one-time).
Already a member? Log in below or here.