Usage

The before and after fields allow you to add text (or HTML) to the displayed value.

  1. Enter your before and after text (or HTML).before-after
  2. The value will be added to the displayed column value when you visit the posts screen.listings-after-before

Enable before and after fields for all columns

By default only the Custom Field column has a before and after field.

To enable before and after fields for all columns, add the following code to your theme’s functions.php:

add_filter( 'cac/column/properties/use_before_after', '__return_true' );

Or add the fields to specified columns:

function my_column_add_before_after_fields( $add_before_after, $column ) {

	// ID and Permalink columns will be affected in this example
	$columns = array(
		'ID',
		'Permalink'
	);

	return in_array( $column->get_type_label(), $columns ) ? true : $add_before_after;
}

add_filter( 'cac/column/properties/use_before_after', 'my_column_add_before_after_fields', 10, 2 );