Skip to content
Docs
Get RestroPress

Action

rpress_before_fooditem_content

Updated
On this page

Fires before the content of a single menu item.

Runs from a the_content filter on the single menu item page (main query only, not password protected). Anything echoed is buffered and prepended to the content.

Parameters#

ParameterTypeDescription
$post_idintMenu item post ID.

Example#

function my_before_fooditem_content( $post_id ) {
	echo '<p class="my-note">' . esc_html__( 'Freshly made to order.', 'my-plugin' ) . '</p>';
}
add_action( 'rpress_before_fooditem_content', 'my_before_fooditem_content' );

Source#

Fired from:

  • includes/template-functions.php (line 416), in rpress_before_fooditem_content()

See also#

Was this page helpful?