ACF Archive

ACF Archives is a little plugin for helping you attach ACF fields do the archive template.

Author:Imark Image (profile at wordpress.org)
WordPress version required:4.1
WordPress version tested:5.4.1
Plugin version:1.0.6
Added to WordPress repository:25-10-2018
Last updated:25-05-2020
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
Rating, %:100
Rated by:2
Plugin URI:https://www.imark.co.il/
Total downloads:10 671
Active installs:1 000+
plugin download
Click to start download

ACF Archives is a little plugin for helping you attach ACF fields to the archive template.
The plugin will add a submenu for each public custom post type with archive defined
and then you can select under ACF rules box.

Want to add or remove the submenu for other custom post types?

Here is a code example you can add to to your theme functions.php

    add_filter( 'acf_archive_post_types', 'change_acf_archive_cpt' );
    function change_acf_archive_cpt( $cpts ) {
        // 'book' and 'movie' are the cpt key.

        // Remove cpt
        unset( $cpts['book'] );

        // Add cpt
        $cpts['movie'] = Movies Archive;

        return $cpts;
    }

Get the acf field on archive page

    $object = get_queried_object();
    $field = get_field( 'field_name', $object->name );

    var_dump( $field );

From within WordPress

  1. Visit ‘Plugins > Add New’
  2. Search for ‘acf archive’
  3. Activate ACF Archive from your Plugins page.

Manually

  1. Upload the acf-archive folder to the /wp-content/plugins/ directory
  2. Activate the ACF Archive plugin through the ‘Plugins’ menu in WordPress

Screenshots
ChangeLog