Home Forums Front-end Issues Not entirely sure how I should implement AJAX with ACF


Not entirely sure how I should implement AJAX with ACF

  • Hello, forgive me if this is such an elementary question, I am new to both ACF and AJAX. I need to implement an AJAX for a page so a part of the page auto refreshes. Using ACF, I have implemented a repeater field but not entirely sure how I should access the post meta/ how I should be doing this.

    Because I access the the data using get_sub_field() inside while loops, how am I supposed to access the data when I’m not in the entire while loop?

    How would you access the post meta for ACF? get_post_meta( $_POST['post_id'], 'xxx', true ); Do I put get_sub_field() in XXX? It does not seem to be working unless I have done something wrong.

    Thanks! I am using ACF Pro if that helps with anything.

  • I have a basic example of load more for a repeater, it does not to the refresh automatically, but it has the basics of the principles of using AJAX to load display additional repeater rows. Hope it helps you.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.