Skip to content

Latest commit

 

History

History
33 lines (25 loc) · 1.87 KB

README.old.md

File metadata and controls

33 lines (25 loc) · 1.87 KB

Advanced Custom Fields - Pages by Template add-on

adds a Pages by Template field to Advanced Custom Fields. Select pages by template.

Description

This is an add-on for the Advanced Custom Fields WordPress plugin and will not provide any functionality to WordPress unless Advanced Custom Fields is installed and activated.

The Pages by Template field provides a new kind of field which allows you to choose pages based on their assigned templates (custom templates). When creating the field in ACF you may choose one or multiple templates to display pages from. You can also choose the ability to select one page or more in which the type will change between checkboxes and radio buttons.

The return value is one or more post objects. Display these in the same way you would a Relationship field or Post Object field.

Source Repository on GitHub

https://github.com/jonathan-dejong/acf_pages_by_template

Bugs, Questions or Suggestions

https://github.com/jonathan-dejong/acf_pages_by_template/issues

Installation

  • Download the add-on and copy the folder fields containing the acf_pages-by-template.php file to your theme folder
  • Include the acf_pages-by-template.php in your theme's functions.php

if( function_exists( 'register_field' ) ) { register_field('acf_page_template', dirname(File) . '/fields/acf_page_per_template.php'); }

To do

  • Create an option to choose all pages
  • Create an option to choose the default template