Support

Account

Home Forums ACF PRO Testimonials Reply To: Testimonials

  • Yes I have created testimonial systems using ACF. I am board this morning so I will help you along.

    Create Testimonial Post Type in your functions.php

    
    $labels = array( 
    	"name" => __( 'Testimonials', 'themeSlug' ),
    	"singular_name" => __( 'Testimonial', 'themeSlug' ),
    	"menu_name" => __( 'Testimonials', 'themeSlug' ),
    	"all_items" => __( 'All Testimonials', 'themeSlug' ),
    	"add_new" => __( 'Add New', 'themeSlug' ),
    	"add_new_item" => __( 'Add New Testimonial', 'themeSlug' ),
    	"edit_item" => __( 'Edit Testimonial', 'themeSlug' ),
    	"new_item" => __( 'New Item', 'themeSlug' ),
    	"view_item" => __( 'View Testimonial', 'themeSlug' ),
    	"search_items" => __( 'Search Testimonials', 'themeSlug' ),
    	"not_found" => __( 'No Testimonials Found', 'themeSlug' ),
    	"not_found_in_trash" => __( 'No Testimonials in trash', 'themeSlug' ),
    	"parent_item_colon" => __( 'Parent Testimonial', 'themeSlug' ),
    	"archives" => __( 'Testimonial Archives', 'themeSlug' ),
    	"insert_into_item" => __( 'Insert into Testimonial', 'themeSlug' ),
    	"uploaded_to_this_item" => __( 'Uploaded to this Testimonial', 'themeSlug' ),
    	"filter_items_list" => __( 'Filter Testimonial List', 'themeSlug' ),
    	"items_list_navigation" => __( 'Testimonial list navigation', 'themeSlug' ),
    	"items_list" => __( 'Testimonials List', 'themeSlug' ),
    	"parent_item_colon" => __( 'Parent Testimonial', 'themeSlug' )
    );
    $args = array(
    	"label" =>'Testimonials', 
    	"labels" => $labels,
    	"description" => "",
    	"public" => true,
    	"publicly_queryable" => true,
    	"show_ui" => true,
    	"show_in_rest" => false,
    	"rest_base" => "",
    	"has_archive" => true,
    	"show_in_menu" => true,
    	"exclude_from_search" => false,
    	"capability_type" => "post",
    	"map_meta_cap" => true,
    	"hierarchical" => false,
    	"rewrite" => array( "slug" => "testimonials", "with_front" => true ),
    	"query_var" => true,
    	"supports" => array( "title","editor" ),
    	"menu_icon" => "dashicons-format-status",
    );
    register_post_type( "testimonials", $args );

    Create Front End Form in a page template file. This one will save the post as pending so you can login and approve.

    See https://www.advancedcustomfields.com/resources/acf_form/ for more form settings

    
    acf_form(array(
             'post_id' => 'new_post',
             'field_groups' => array(6), // Used ID of the field groups here.
             'form' => true,
             'new_post' => array(
                 'post_type' => 'testimonials',
                 'post_status' => 'pending'
             ),
             'submit_value' => 'Submit Book',
         ));