wpbd_column_count

Heads up!
This article contains PHP code and is intended for developers. We offer this code as a courtesy, but don't provide support for code customizations or 3rd party development.

Show the listings in a set a custom number of columns on the directory pages. Use 1, 2, 3, 4, or 6 columns.

Usage

add_filter('wpbd_column_count', 'wpbd_my_column_count');

Parameters

  • $columns (int) – The number of columns
  • $args (array)
    • $args['display'] (string) – excerpt or single

Examples

Use a 2 column layout

add_filter( 'wpbd_column_count', 'bd_set_column_count', 10, 2 );
function bd_set_column_count( $count, $atts ) {
	if ( $atts['display'] === 'excerpt' ) {
		$count = 2;
	}
	return $count;
}

Change Log

Added in version 5.8

Related Articles

Need Support?

Can't find the answer you're looking for?
Contact Support