Hello!
I have a Custom Post Type for content lists with Repeater Field and pagination. So, there’s a subpage for each item. I used this code: http://jonathannicol.com/blog/2014/03/06/paginating-an-advanced-custom-fields-repeater/
The problem is: I created a custom field for the list intro text. Is there a way to display this intro field in the first pagination, before the repeater loop?
It would be like this:
/post-type/post-title/
Intro text
/post-type/post-title/1
Item 1
/post-type/post-title/2
Item 2
…
/post-type/post-title/n
Item n
Thanks in advance!
You can use the following code (just replace the “CODE” with the code you already have).
<?php if ( ! get_query_var( 'page' ) ) : ?>
<?php the_field( 'the_field_you_want_to_display' ); ?>
<?php else : ?>
CODE
<?php endif; ?>