Action
rpress_menu_section_rails
Fires in the menu templates at the spot for rails that are not placed first.
The grid menu template fires it after the service row, above the menu items. The list menu template fires it at the position of the rails entry in the section order. Core renders the rails here only when they do not come first, because rails placed first are printed above the menu columns on rpress_menu_page_top. Use it to print your own content at this spot.
Available since RestroPress 3.5.1.
Example#
add_action( 'rpress_menu_section_rails', 'my_menu_promo', 20, 0 );
function my_menu_promo() {
echo '<p class="my-menu-promo">' . esc_html__( 'Free dessert on orders placed before 6pm.', 'my-plugin' ) . '</p>';
}
Notes#
It also fires when the rails come first (core then prints nothing here). In the list template it does not fire if the filtered section order leaves rails out.
Source#
Fired from:
templates/grid/fooditems.php(line 88)templates/list/fooditems.php(line 95)
See also#
Was this page helpful?
