Menu Items | ||
---|---|---|
Type | Example | Description |
By Category | [wppizza category=’slug’] | Displays menu items of one, multiple or all categories |
Bestsellers | [wppizza bestsellers=’10’] | Displays top 10 bestsellers |
Single item | [wppizza single=’5′] | Display only one particular item |
Add to cart button | [wppizza type=’add_item_to_cart_button’ id=’1338′ size=’0′] | Display a distinct add to cart button for a particular item/size |
– elements available: ‘title’, ‘thumbnail’, ‘prices’, ‘content’, ‘permalink’, ‘category’, ‘additives’
following defaults are used if omitted
– ‘default’ style: elements = ‘thumbnail, prices, title, content’
– ‘responsive’ style : elements = ‘title, thumbnail, prices, content’
– ‘grid’ style: elements = ‘title, thumbnail, prices, content’
IMPORTANT: if you use the permalink
element, you must also use/create a single.php file that works with your theme. Please open wppizza/templates/markup/single/single.php
in a suitable text editor and follow the instructions contained within the file
Note: Using the “additives” element will simply also display the same additives that are shown in the title elsewhere. (but you could use the appropriate template filter – ‘wppizza_filter_post_title_markup’ – to remove them from the title )
using the ‘category’ element will display the category *name*
Examples |
---|
[wppizza]
|
– display menu items of the first/topmost category (“WPPizza->Categories”) with published menu items |
[wppizza category='pizza']
|
– display menu items of the “pizza” category |
[wppizza category='pizza,snacks']
|
– display menu items of the “pizza” and “snacks” category |
[wppizza category='!all']
|
– display all menu items of all categories in order of categories set in “WPPizza->Categories” |
[wppizza category='!all,-pizza,-pasta']
|
– display all menu items of all categories but – exclude “pizza” and “pasta” categories |
[wppizza category='pizza' noheader='1']
|
– display all menu items of category with slug “pizza” – do not show category header and description above list of menu items |
[wppizza category='pizza' showadditives='0']
|
– display all menu items of category with slug “pizza” – hide additives list at end of category display – set to 0 to force not to display additives list – set to 1 to always display additives list – omit attribute entirely to automatically display if any menu item in category has additives associated with it. – if using multiple categories on one page , you might want to set this attribute separately per shortcode |
[wppizza category='pizza' exclude='6,5,8']
|
– display all menu items of category with slug “pizza” – exclude menu items with id’s 6,5,8 |
[wppizza category='pasta, pizza' include='10,11,12']
|
– display all menu items of category with slug “pasta” or “pizza” – BUT only includes menu items with id 10,11,12 (i.e excludes all menu items that are not 10,11,12) – has priority over exclude if used – set menu id’s must be in the categories displayed – essentially a reverse option of excluding menu items |
[wppizza category='pasta, pizza' style='grid']
|
– sets the style attribute to “grid” to override the style settings in “Wppizza->Layout : Style->Which style to use” – possible options: grid OR default OR responsive – IMPORTANT: if you set a style here that is NOT already your selected style in “Wppizza->Layout : Style” , make sure you enable the stylesheet for this style too in “Wppizza->Layout : Style -> Load additional styles” |
[wppizza category='pasta, pizza' style='grid' item_class='my_class another_class']
|
– display all menu items of category with slug “pasta” or “pizza” – use grid style – add your own class name(s) to each menu item (article element) |
[wppizza category='!all' style='responsive' elements='thumbnail, prices, title, content']
|
– display all menu items of all categories listed by order of categories set in WPPizza->Categories – use responsive style – sets elements displayed to be thumbnail, prices, title, content (in that order). – simply omit an element to not display it, omit attribute entirely to display default elements – elements available: ‘title’, ‘thumbnail’, ‘prices’, ‘content’, ‘permalink’ – default for ‘default’ style = ‘thumbnail, prices, title, content’ – default for ‘responsive’ style = ‘title, thumbnail, prices, content’ – default for ‘grid’ style = ‘title, thumbnail, prices, content’ NOTE: If you use the permalink element, you should set up a single.php template according to the manual (note to self: link to insert when available) |
[wppizza category='pasta, pizza' currency_main='left']
|
– display main large currency symbol to left of prices – omit “currency_main” attribute to use global settings in “Wppizza->Layout-> Prices / Currency Symbols : *Main* currency symbol and *Main* currency symbol position” – ‘0’ to not display – ‘right’ to display to the right of prices – ‘left’ to display to the left of prices |
[wppizza category='pasta' currency_price='left']
|
– displays small currency symbol left of each price – omit “currency_price” attribute to use global settings in “Wppizza->Layout-> Show a currency symbol directly next to each price” – ‘0’ to not display – ‘right’ to display to the right of each price – ‘left’ to display to the left of each price |
[wppizza category='pasta' image_prettyphoto='0']
|
– disable prettyPhoto for this menu item list – omit “image_prettyphoto” attribute to use global settings in “Wppizza->Layout-> Enable prettyPhoto (Lightbox Clone) on menu item images” – ‘0’ to disable – ‘1’ to enable |
[wppizza category='pasta' image_placeholder='0']
|
– disable placeholder images if no featured image associated with menu item – omit “image_placeholder” attribute to use global settings in “Wppizza->Layout-> Display placeholder image” – ‘0’ to disable – ‘1’ to enable |
Examples |
---|
[wppizza bestsellers='6' ifempty='5,9,8,11']
|
– display top 6 bestsellers – display menu item id’s 5,9,8 and 11 if no bestsellers exist yet |
[wppizza bestsellers='10' include='5,9,8,11']
|
– displays top 10 bestsellers (or fewer if less than 10 items were sold) – distinctly add menu items with id’s 5,9,8 and 11 to list. These additionally included items will be included/inserted according to order set |
Examples |
---|
[wppizza single='6']
|
– output single menu item that has id 6 |
[wppizza single='50,51']
|
– output menu items of ids 50 and 51 |
[wppizza single='50' price_id='0']
|
– output only first (meal)size of menu item with id 50 |
[wppizza single='50' price_id='0:1']
|
– output only first two (meal)size of menu item with id 50 |
[wppizza single='50,51' price_id='0:1:3,1']
|
– output only first two and forth – meal sizes id’s are zero indexed – sizes of menu item with id 50 and second only of menu item with id 51. – I.e: use commas to separate item ids, colons separate meal sizes id’s. Make sure price_id(s) actually exist for a given menu item id |
Add to cart button | |||
---|---|---|---|
output a button – with or without dropdown, depending on number of sizes available – to allow adding of a specified menu item to cart | |||
type=’add_item_to_cart_button’ | required | string | |
id=’6′ | required | integer | id of wppizza menu item |
size=’2′ | optional | integer | id (zero indexed) of wppizza menu size for that item |
single=’1′ | optional | omit | 1 | set to 1 to not output dropdown choice of sizes (if any). omit attribute to automatically show sizes dropdown if available |
Examples |
---|
[wppizza type='add_item_to_cart_button' id='6' size='0']
|
– output a button to add menu item with id 6 and size id 0 to cart. if there is more than one one size choice a dropdown will be displayed |
[wppizza type='add_item_to_cart_button' id='6' size='1' single='1']
|
– output a button to add menu item with id 6 and size id 0 to cart. No dropdown will be displayed. Button will only add ID=6 Size=1 to the cart |