LiveLink Case Study<>

Adding a custom field to the WordPress template

Advanced Custom Fields WordPress plugin

Before performing this procedure you must install the Advanced Custom Fields (ACF) WordPress plugin. This plugin allows you to associate additional content fields with a page template.

» For more information

To create a field to store the course instance code

Assuming that Advanced Custom Fields is installed:

1Choose Select Settings > Adv Custom Field in the WordPress administration section.

2Choose Add New to add a new field group. This field group will contain the Course Instance Code Field.

In the screen shot below the Course Instance Code is part of the Courses field group.

The field has been named course_instance_code. We access the contents of this field using $courseInstanceCode = get_field('course_instance_code'); in our PHP script.

3Associate the field with the template you will use to display the course pages.

To do this use the Location option in the Advanced Custom Fields set up.