plugin-icon

Advanced Custom Fields: Archive Templates

제작자: Imark Image·
ACF Archive is a little plugin for helping you attach ACF fields to the archive template.
등급
5/5
버전
1.0.6
활성화된 설치 항목
900
최근 업데이트일
May 25, 2020

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
무료Business 요금제에서
설치하면 WordPress.com 서비스 약관서드파티 플러그인 약관에 동의하게 됩니다.
테스트된 버전
WordPress 5.4.18
이 플러그인은 다운로드할 수 있으며 에서 사용할 수 있습니다.