epl_elementor_default_card_id: the default card for the Listings Results widget

Description #

EPL installs a ready-made EPL Listing Card template called "EPL Card". Its ID is the default value of the Listing Card control on the Listings Results widget, and it's marked "(Default)" in that list. Return another EPL Listing Card template's ID to make it the default, or 0 to default to the EPL Built-in Card (EPL's PHP loop template).

The default value is the "EPL Card" template's ID while it's installed and published, otherwise 0. There's no site-wide card: a card is only used where a widget picks one. If the chosen card isn't a published EPL Listing Card, the widget falls back to EPL's PHP loop template.

Part of the Elementor integration, which is in beta. See Elementor widgets and templates (beta) for how the widgets and templates fit together.


Usage #

add_filter( 'epl_elementor_default_card_id', 'my_function' );

Parameters #

$card_id (int)
ID of the default EPL Listing Card template. Default the bundled "EPL Card" template, or 0.


Examples #

Make your own card (template 456) the default:

function my_epl_default_card( $card_id ) {
	return 456;
}
add_filter( 'epl_elementor_default_card_id', 'my_epl_default_card' );

Source #

lib/page-builders/elementor/class-epl-elementor-template-seeder.php, in EPL_Elementor_Template_Seeder::get_default_card_id(). Since 3.6.