Menu Items – WPPizza Documentation https://docs.wp-pizza.com documentation for the wordpress wppizza plugin (version 3.x) Tue, 09 May 2023 12:08:20 +0000 en-US hourly 1 https://wordpress.org/?v=6.8.2 Menu Items https://docs.wp-pizza.com/menu-items/ Tue, 13 Jun 2017 08:46:30 +0000 http://v3x.wp-pizza.com/?p=55 …]]> Overview – click on the links to view all available attributes

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
]]>
By Category https://docs.wp-pizza.com/by-category/ Tue, 13 Jun 2017 08:30:52 +0000 http://v3x.wp-pizza.com/?p=41 …]]> (Items in) Categories Display     category=’pizza’ optional !all | slug | -slug which category/ies to (not) display – using category slug !. if omitted, will display menu item of topmost/first – non-empty – category in “WPPizza categories” noheader=’1′ optional omit|0|1 set attribute to not display category header and description above list of menu items showadditives=’1′ optional omit|0|1 show/hide/auto list of additives exclude=’5,6,8′ optional integers, comma separated comma separated list of menu items you want to exclude include=’5,6,8′ optional integers, comma separated comma separated list of the menu items you want to include. Excludes ALL OTHER menu items. item_class=’my_class another_class’ optional valid class name(s) add your own class name(s) to each menu item (although there are plenty of classes already i would think) style=’grid’ optional default|responsive|grid sets the style attribute to override the style settings in “Wppizza->Layout : Style->Which style to use”. Make sure you enable the stylesheet for this style too in “Wppizza->Layout : Style -> Load additional styles” elements=’thumbnail, prices, title, content’ optional comma separated (depending on style) “elements” – comma separated element names – order of elements to display (depends on style attribute)

– 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* currency_main=’left’ optional 0|left|right position of main/large currency symbol currency_price=’right’ optional 0|left|right position of currency symbol next to each price image_prettyphoto=’1′ optional 0|1 enable/disable pretty photo image_placeholder=’1′ optional 0|1 enable/disable photo placeholder viewonly=’1′ optional 0|1 disables items from being added to cart, removes shopping cart icon notags=’1′ optional 0|1 strips all tags – images, links etc – from post (menu item) content / text accordion=’1′ optional omit|0|1 display multiple categories in accordion style (overrides noheader attribute; ignored for single categories)
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
]]> Bestsellers https://docs.wp-pizza.com/bestsellers/ Tue, 13 Jun 2017 08:31:10 +0000 http://v3x.wp-pizza.com/?p=42 …]]> Bestsellers Note: You can also use all other non-category related attributes as listed in “By Category”   bestsellers=’5′ required integer Number of bestsellers to display (Sales > 0 in descending order) ifempty=’5,9,8,11′ optional menu item id’s, comma separated display menu items with ids 5,9,8 and 11 when no bestselleres exist yet (typically only displayed on fairly new installations) include=’8,12′ optional menu item id’s, comma separated distinctly include menu items with ids 8,12. included/inserted according to menu items order set
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
]]>
Single Menu Items https://docs.wp-pizza.com/single-menu-items/ Tue, 13 Jun 2017 08:31:30 +0000 http://v3x.wp-pizza.com/?p=43 …]]> Display Single Menu Item Simply output one (or more) single menu item instead of menu items of a whole category
Note: You can also use all other non-category related attributes as listed in “Categories / Category Loop / By Category” (style, currency position, elements etc)   single=’6′ required integer(s) id(s) of wppizza menu item(s) price_id=’0′ optional integer(s) only display a particular price (menu size) with this single item (simply omit to display all available)
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
]]>
Powered by atecplugins.com