Support » Plugin: Advanced Custom Fields » ACF custom page with fields – how to loop it?

  • Hello there!

    I am working on a website i have totally no problem using ACF. However i do have a question. When you create a custom post type in the functions.php of the theme directory you can create a simple WP_Query loop with the post_type the name of that custom post type and some arrays.

    The problem is.. i have created a OPTIONS page instead of a custom post field.. inside that page i have created ACF repeater with a image, title and description.

    Now i want to loop that content but it is not working with a default LOOP.. for the custom post type.

    this is my page custom options page:

    if( function_exists('acf_add_options_page') ) {
    	$page = acf_add_options_page(array(
    		'page_title' 	=> 'Course Settings',
    		'menu_title' 	=> 'Courses',
    		'menu_slug' 	=> 'course-settings',
    		'capability' 	=> 'edit_posts',
    		'icon_url'	 	=> 'dashicons-megaphone',
    		'position' 		=> 5,
    		'redirect' 	=> false

    It works perfect.. but how can i LOOP a options page instead of a custom post type?

    Thanks in advance for the help!


Viewing 1 replies (of 1 total)
  • Just not to be unresponsive to other people with the same doubt, you don’t need to loop, simply insert the_field('field','option'); on site designed in your template.

    If I were to use loop, as it is a kind of “page” in your custom post type, you would use 'post_type'= >'page'

Viewing 1 replies (of 1 total)
  • The topic ‘ACF custom page with fields – how to loop it?’ is closed to new replies.