Skip to content

netconstructor/ACF-Pages-by-Template

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Advanced Custom Fields - Pages by Template add-on

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published