Home › Forums › Add-ons › Flexible Content Field › Pagination › Reply To: Pagination
Thank for your reply @elliot I will try this solution. I work on another solution but I do not know yet if it’s the most efficient.
My solution is as follows:
I create a “next_page” field. Whenever WordPress meets a flexible field, I increment my content in a variable $myContent.
When WordPress meets a field next_page I do this:
$myContent = "<--nextpage -->\n"
at the end of my loop I attribute $myCONTENT to the_content() and I appear like this:
global $ post;
$post-> post_content = $MyContent;
setup_postdata($post);
remove_filter('the_content', 'wpautop');
the_content();
wp_link_pages();
This works well but I do not know what it is worth in terms of performance.
Your solution looks more flexible. I would try in the coming days.
thank you very much
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.