In this example:
Ajax Load More will load a featured set of posts using the Relationship field for Advanced Custom Fields and the ACF extension.

The Relationship field for Advanced Custom Fields allows you to select from pages, posts and custom post types to build an array of related content – Ajax Load More is used to loop over related item and display the results with infinite scrolling.

NOTE: When using the Relationship field remember to set orderby=”post__in” in your shortcode and select Post ID as the return type when creating your field in ACF – see this screenshot.


The following shortcode was used to create the Relationship Field example.

[ajax_load_more preloaded="true" preloaded_amount="2" repeater="template_29" post_type="ajax_more" posts_per_page="4" orderby="post__in" pause="true" pause_override="true" button_loading_label="Loading..." acf="true" acf_field_type="relationship" acf_field_name="alm_featured_posts"]