Skip to content
Docs
Get RestroPress

Action

rpress_fooditem_after_badges

Updated
On this page

Fires after the badge row of a menu item in the modern list template.

Runs in the modern template pack's list item template, after the tags and dietary badges and before the price. Core uses it to render allergen badges. Echo extra badges or labels here.

Available since RestroPress 3.5.

Parameters#

ParameterTypeDescription
$idintMenu item ID.

Example#

function my_fooditem_extra_badge( $id ) {
	if ( get_post_meta( $id, '_my_chef_pick', true ) ) {
		echo '<span class="my-badge">Chef pick</span>';
	}
}
add_action( 'rpress_fooditem_after_badges', 'my_fooditem_extra_badge' );

Notes#

Only fires for the modern template pack list view.

Source#

Fired from:

  • templates/packs/modern/list/single.php (line 105)
Was this page helpful?