Action
rpress_fooditems_list_top
On this page
Fires before the first item of a category with items.
Runs once per category in the menu list templates, only when the category query has items, before the item loop starts.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$atts | array | The menu item shortcode attributes. |
$fooditems | WP_Query | The query for the current category. |
Example#
function my_fooditems_list_top( $atts, $fooditems ) {
echo '<span class="my-item-count">' . (int) $fooditems->post_count . '</span>';
}
add_action( 'rpress_fooditems_list_top', 'my_fooditems_list_top', 10, 2 );
Source#
Fired from:
templates/fooditem/fooditems.php(line 79)templates/fooditem/fooditems.php(line 125)templates/grid/fooditems.php(line 111)templates/list/fooditems.php(line 106)
See also#
Was this page helpful?
