Description

This function returns the Conductor content layout for the current piece of content.

The Conductor content layout is passed to the conductor_content_layout filter before it is returned.

Note: The earliest that this function can be used reliably during the life cycle of a page is after the Conductor::is_conductor() function has been called.

Conductor content layout structure (array keys and values):
  • field_label (string): Label generated by Conductor based on type of content layout, used on the Conductor Options page and in the Customizer
  • sidebar_name_prefix (string): Label generated by Conductor based off of the field_label parameter (value may be identical to field_label in some cases), used when registering a Conductor Sidebar in the name and description parameters
  • field_type (string): The type of content piece for which this content layout applies to
    • “Built-in” Conductor field_type values:
      • built-in (i.e. Front Page or Home/Blog Page)
      • category
      • post-type
      • post
      • page
  • field_id (mixed [int, string]): , Unique ID (i.e. Post ID, Category ID, or Post Type Name/ID) for content type
  • value (string): ID/Name for the selected content layout
    • “Built-in” Conductor value values:
      • default (Disabled)
      • cols-1 (1 column)
      • cols-2 (2 columns)
      • cols-2-r (2 columns, reversed)
      • cols-3 (3 columns)
      • cols-3-m (3 columns, content middle)
      • cols-3-r (3 columns, reversed, content right)
Conductor content layout examples:
Uncategorized category with disabled content layout selected:
array(
	'field_label' => 'Category - Uncategorized',
	'sidebar_name_prefix' => 'Uncategorized - Category',
	'field_type' => 'category',
	'field_id' => 1,
	'value' => false
)
Uncategorized category with two column reversed content layout selected:
array(
	'field_label' => 'Category - Uncategorized',
	'sidebar_name_prefix' => 'Uncategorized - Category',
	'field_type' => 'category',
	'field_id' => 1,
	'value' => 'cols-2-r'
)

Technical Details

  • Type: Function
  • Parameters: None
  • Return Value: array

Resources

Examples

The following example demonstrates how to use the current Conductor content layout properties to load a custom Conductor template.