
前言介紹
- 這款 WordPress 外掛「Snillrik Restaurant Menu」是 2019-02-19 上架。
- 目前尚無安裝啟用數,是個很新的外掛。如有要安裝使用,建議多測試確保功能沒問題!
- 上一次更新是 2026-01-17,距離現在已有 39 天。
- 外掛最低要求 WordPress 4.5.2 以上版本才可以安裝。
- 有 1 人給過評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
外掛標籤
lunch menu | restaurant | shortcodes |
內容簡介
這個外掛的概念是您可以創建不同的菜餚,包括圖片、價格、成分等等。然後可以輕易地根據需要更改菜單,例如午餐菜單,您可以始終使用相同的菜單和短碼,但您每天都希望更換不同的菜品。您還可以為每周不同的每一天創建多個菜單。
此外,不同菜品還有所屬的類別,例如肉類、魚類、素食、冰淇淋等等,因此菜單項目將按照其所屬的類別順序排列。
此外,此外掛添加了菜餚和菜單文章類型,可以像 WordPress 標準文章一樣添加和編輯。然後,您可以使用小工具在頁面上添加特定菜餚和菜單的短碼。
短碼
[snillrik_restaurant_menu menuid=”42″ showcategory=1|0 hideimage=1|0 linktitle=1|0 category=”” orderby=”menu_order”]
如果要不顯示類別文字,請選擇 0,如果要鏈接到菜品頁面,請選擇 1 等等。menu_order 是在管理中設置的每道菜的順序參數。orderby 也可以設置為常用的 wp 排序方法,例如日期或標題。
[snillrik_restaurant_dishes]
一個簡單的按類別排序的菜品列表,可用作側邊菜單等。
篩選器
它們預設為 snillrik_lm_menu 和 snillrik_lm_dish,這可能不是很漂亮,但它是獨一無二的... 因此,如果您想使 URL 變得更漂亮,例如 /dishes/ 或 /food/,請使用這些。
add_filter(“snillrik_lm_rewrite_menu”,function($thename){
return “menue”;
},10,1);
add_filter(“snillrik_lm_rewrite_dish”,function($thename){
return “dish”;
},10,1);
每個菜品的範本/HTML。
默認範本有點簡單,但很容易進行樣式設置,作為起點很不錯。如果要更改每道菜品的 HTML,請使用此篩選器。
add_filter(‘snillrik_restaurant_dishbox_html’, function ($return_html, $atts) {
$post_title = $atts[‘title’];
$tag_strings = $atts[‘tags’];
$content_str = $atts[‘content’];
$ingredients_str = $atts[‘ingredients’];
$price_str = $atts[‘price’];
$thumb = $atts[‘thumb’];
return "“
$tag_strings
$post_title
$content_str
$ingredients_str
$price_str
$thumb
“;
}, 10, 2);
活躍的貢獻者
Mattias P Kallio(培訓)
原文外掛簡介
The idea is that you can create a bunch of different dishes, with images, price, ingredients etc… Then these are used to make up menus that are easily changed from day to day. So a particular use would be a lunch menu where you would want the same menu and shortcode but you want to change dishes every day. You could also have several menus, maybe one for each day of the week.
There are also categories for the different dishes, so if you have like Meat, Fish, Veg, Ice cream etc, the menu will be in that order.
So, the plugin adds th post types Dishes and Menus that can be added and edited the wordpress way. Then you can use the widget to add specific dishes and a shortcode for the menu on a page.
Shortcodes
[snillrik_restaurant_menu menuid=”42″ showcategory=1|0 hideimage=1|0 linktitle=1|0 category=”” orderby=”menu_order”]
If you want to not show the category text chose 0 and if you want to link to the dish page chose 1 etc. menu_order is the order param set in admin on each dish. the orderby can be set to common wp orderbys too, like date or title.
[snillrik_restaurant_dishes]
A simple list of dishes sorted under categories. Intended to be a side menu etc.
Filters
They default to snillrik_lm_menu and snillrik_lm_dish witch might not be tha pretty, but it’s unique… So if you want the urls to be something like /dishes/ or /food/, use these.
add_filter(“snillrik_lm_rewrite_menu”,function($thename){
return “menue”;
},10,1);
add_filter(“snillrik_lm_rewrite_dish”,function($thename){
return “dish”;
},10,1);
Template / html for each dish.
The default template is a bit basic, but it’s easy to style and it’s a good start. If you want to change the html for each dish, use this filter.
add_filter(‘snillrik_restaurant_dishbox_html’, function ($return_html, $atts) {
$post_title = $atts[‘title’];
$tag_strings = $atts[‘tags’];
$content_str = $atts[‘content’];
$ingredients_str = $atts[‘ingredients’];
$price_str = $atts[‘price’];
$thumb = $atts[‘thumb’];
return “
$tag_strings
$post_title
$content_str
$ingredients_str
$price_str
$thumb
“;
}, 10, 2);
Active Contributors
*Mattias P Kallio
2.1.7
Rewrote maintenance of the plugin.
=2.1.5=
Testing for WP 6.5.
Added Elementor Widget for showing menues.
=2.1.2=
If there is a price set on a menu the link to the dish page will be removed. (because it wont know what price to show on the dish page).
“linktitle” parameter was not working poparly, fixed that.
Fixed some minor not-even-bugs mostly regarding prices and links, but things that could be better. 🙂
If price is set to zero on dish (or no price at all) no price will be shown on dish page (it showed 0 before).
=2.1.1=
Prettyfying UI.
If price is 0 nothing is shown.
Check compability with WP 6.2
=2.1.0=
Got som tips and ideas from Alex C. Thanks for that. 🙂
Fixed som weird look in admin on mobile.
Added som divs and classes to make it easier to style the menu.
Added a filter for the html of each dish in the menu, to
=2.0.0=
Added possibility to set a price for each product in the menu.
Settings page now has a possibility to set decimals for prices.
Some styling and code prettfying.
1.9.0
Making single dish page a bit more styleable
fixing a bit more easy to use css-classes etc.
(also a bit hidden paramter ‘menu_style’ => ‘default’, // default, round, it’s not that big of a differance, but it’s to make it more usable for non-webbnerds later.)
1.8.6
Added parameter for showing or hiding images in shortcode: hideimage=1|0
Some styling and minor stuff (like space between price and sign)
1.8.5
Testing version 6.1.1 and some minor style fixes.
1.8.4
I got a bunch of suggestions, tips and some testing, so there are a lot of updates now. 🙂
If price is 0 nothing is shown instead.
1.8.3
Fixed category naming bug when using dishes shortcode
1.8.2
Fixed bug in translations.
1.8.0
Added filters for rewriting the urls (as displayed in readme)
Re-thought the categories and tags and it now works more like commonly in WP.
Added a shortcode generator on each menu for when using it on pages.
Added tags to the only template that currently exists.
Got a bunch of cool ideas from Jarko, so thanks for that. 🙂
1.7.2
Test of WP 6.0 and making it a bit more easy to style the menues.
1.7.1
Made it a bit easier to style the menu, it’s now css flex.
1.7
Some more escaping output and some fix, trix and just some TLC.
1.6.4
Escaping text and securing output to browser.
1.6.3
Testing for 5.8, no updates
1.6.2
Making code a bit more consistant, and prettified a bit too.
Made the menu-urls show dishes but the shortcodes in pages is probably still the easiest way to show menus.
And minor bugfixes.
Some text changes.
1.5.2
Minor bugfix in shortcode showing title when showcategory set to string “true”.
Added parameter showcatdescription to hide description text even if set in category
1.5.1
Minor update, mostly just a version check for WP 5.7
1.0
New
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Snillrik Restaurant Menu」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
2.1.5 | 2.2.0 | 2.2.1 | 2.2.2 | 2.3.0 | 2.3.1 | trunk |
延伸相關外掛(你可能也想知道)
Column Shortcodes 》此外掛提供簡單易用的短碼,在您的文章或頁面中輕鬆創建欄位。有時候,您只需要將網頁切成不同的欄位。使用此外掛,您只需選擇一個欄位的短碼,便可將欄位加...。
Sidebar Widgets by CodeLights 》❗ 很抱歉,由於 SiteOrigin 的 widgets API 完全更改,CodeLights 不再支援 SiteOrigin Page Builder 的原生使用。解決方案:您仍然可以在純文字編輯器中創...。Shortcodes by Angie Makes 》Shortcodes by Angie Makes 外掛為您的 WordPress 主題新增一系列易於使用的短碼,這些短碼與 Angie Makes WordPress 主題 完美搭配。, 範例, 請到此查看這些...。
ND Shortcodes 》預覽中的一些元件, 該外掛在你的頁面建構器(Elementor 或 WP Bakery Page Builder)中添加了一些有用的元件,可以非常容易地與你自己的主題集成。。
Futurio Extra 》Futurio Extra 提供額外功能和選項給 Futurio 主題使用。, 該外掛需要免費的 WP 主題 Futurio 安裝才能使用。, Futurio Extra 帶來了新的小工具,可供 Elemen...。
Apollo13 Framework Extensions 》Apollo13 Framework Extensions 為建立在 Apollo13 Framework 上的主題增加了一些功能。這些功能包括:, , 設計匯入器, 基於 Apollo13 Framework 功能的短代...。
WP Shortcode by MyThemeShop 》WP Shortcode 讓使用者只需點擊一下,即可在 WordPress 增加性感的按鈕、警告提示、欄位佈局等各式各樣的選項。這款高級插件曾經只向MyThemeShop的高級會員提...。WP Date and Time Shortcode 》顯示當前、過去和未來日期或時間的簡碼。在您的文章和頁面中顯示今年、上一年、下一年、月份、日期等等。, 這可能是您網站所需的最後一個日期和時間簡碼插件...。
WooCommerce Shortcodes 》這個外掛提供一個 TinyMCE 的下拉式按鈕,讓您可以使用所有 WooCommerce 短碼。, 請參閱 WooCommerce 包含的短碼清單。, 從 WooCommerce 2.2 開始,這個 Tiny...。
WooCommerce Colors 》這款外掛在自訂選單上新增了一個名為 WooCommerce 的區塊,讓您輕鬆改變按鈕和 WooCommerce 元素的顏色。, 從 WooCommerce 2.3 開始,前端風格選項不再是 Woo...。
TemplatesNext ToolKit 》這個外掛提供了許多必要的元素,如簡歷、團隊成員、推薦評價、輪播、WooCommerce 產品清單等等,使用短代碼、SiteOrigin Page Builder 或 Elementor widget ...。
TCD Google Maps 》TCD Google Maps 提供簡單的短代碼以顯示 Google 地圖。您可以將短代碼放置於文章、頁面或文字小工具中,以顯示各種風格的 Google 地圖。, 多樣的設計, 方便...。Shortcake (Shortcode UI) 》Shortcake 可與 add_shortcode 搭配使用,提供使用者友善的介面來將 shortcode 加入文章中,並在內容編輯器中查看和編輯。, 安裝外掛後,您需要註冊 Shortcod...。
Elements For Elementor 》Elements For Elementor, 這個外掛為Elementor Page Builder加入了一些實用的元素。所有元件都是完全響應式且具備視網膜級別的畫質。。
Meks Flexible Shortcodes 》Meks Shortcodes 是一個外掛,可以在文章/頁面內的內容中加入一些漂亮的元素。您可以透過使用者介面中的短碼產生器面板快速插入所有元素。對於每個短碼標籤,...。
