[WordPress] 外掛分享: Navception

前言介紹

  • 這款 WordPress 外掛「Navception」是 2013-06-27 上架。
  • 目前有 300 個安裝啟用數。
  • 上一次更新是 2014-10-22,距離現在已有 3847 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
  • 外掛最低要求 WordPress 3.5 以上版本才可以安裝。
  • 有 9 人給過評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

faison |

外掛標籤

menu | menus | submenu | submenus | menu item |

內容簡介

關於Navception

Navception:將預先建立的WordPress選單嵌入另一個WordPress選單的行為。

Navception為WordPress菜單添加了一個簡單的功能,但也為強大的可能性打開了大門。在您的WordPress菜單編輯器中新增了一個框,讓您將菜單添加至菜單中!這允許您製作一個菜單,並將其作為次級菜單添加到另一個菜單中、在另一個菜單中多次添加或在多個菜單中多次添加。什麼使其強大?如果您決定需要在子菜單中增加另一個鏈接,則只需將其在一個位置上更新即可!Navception是一個簡單的概念,但具有強大的結果!

讓我們看一些場景:

沒有Navception

如果您需要在整個網站中重複使用次級菜單:首先您必須在您想要的每個地方添加所有鏈接,然後如果需要更新次級菜單,您必須修改次級菜單存在的每個地方的鏈接。
如果菜單項目太多:您必須挑選需要移除哪些菜單項目以為新菜單項目腾出空间。

有了Navception

如果您需要在整個網站中重複使用次級菜單:首先,您可以將子菜單製作成獨立的WordPress菜單,然後嵌入需要它的位置,接著,如果需要更新子菜單,您只需要在獨立菜單中修改鏈接即可。
如果菜單項目太多:您可以將某些子菜單分裁成WordPress菜單,然後將這些新菜單嵌入到原始菜單中,以腾出更多菜單項目的空间。

Navception的創建過程

在為客戶的主菜單工作時,我開始思考Navception的創建過程。該菜單是一個典型的三級菜單,其中有兩個子菜單,每個菜單都重複出現了四次。這些子菜單添加起來非常麻煩,而且也很難維護。當我意識到我想要一個可以將子菜單製作一次並將其作為菜單項目包含在另一個菜單中的插件時,我很驚訝沒有這樣的插件存在。

在繼續為該客戶的主菜單工作時,Navception已變得必不可少。這個菜單變得非常龐大,我收到了以下警告:您接近服務器配置所強制要求的帖子變量限制。超過此限制可能會在保存時自動刪除菜單項目。 結果,在WordPress管理區域中的每個Nav菜單項目大約有8個輸入與之相關聯。其中一個子菜單包含7個菜單項目,即56個輸入。使用Navception,我創建了一個子菜單,將其製作成獨立的WordPress菜單,然後包含它作為客戶主菜單的一個菜單項目。這使該子菜單產生的輸入從56個減少到8個,進而避免Post变量限制,並使菜单更易于管理。

Navception的危險性

當在其他菜單中嵌入菜單時,必須注意不要在自身中包含相同的菜單。當直接或間接完成時,這會導致您的網站進入無限循環中(也稱為Limbo),試圖顯示菜單。我新增了一些保護措施,以防止您意外引起這種情況,但我只有90%的信心說涵蓋了所有情況。如果您曾經使您的網站陷入Limbo,您只需要刪除您嵌入的菜單,然後在支持論壇中發帖告訴我您做的事情,以便我也可覆蓋該情況。

原文外掛簡介

About Navception
Navception: The act of embedding a pre-constructed WordPress Menu inside another WordPress Menu.
Navception adds a simple feature to WordPress Menus, but opens the door to powerful possibilities. New to your WordPress Nav Menu editor, is a box that lets you add menus into your menus! This allows you to create one menu to include as a submenu once in another menu, multiple times in another menu, or multiple times in multiple menus. What makes this so powerful is that if you decide that your submenu needs another link added to it, you only have to update it in one place! Navception, a simple concept with powerful results!
Let’s look at a couple of scenarios:
Without Navception

If you have a submenu you need repeated across your site: First you have to add all the links everywhere you want the submenu, then to update the submenu you have to modify the links everywhere the submenu exists.
If you have too many menu items in your menu: You have to pick and choose which menu items are removed to make room for new ones.

With Navception

If you have a submenu you need repeated across your site: First you create the submenu as a stand-alone WordPress menu and embed it where you need it once, then to update the submenu you only need to modify the links in the stand-alone menu.
If you have too many menu items in your menu: You make some of the submenus separate WordPress menus and embed those new menus into the original menu to make room for more menu items.

Navception’s Inception
Navception became a thought when working on a client’s main menu. This menu was a typical 3 level menu, with two submenus that were repeated 4 times each. Those submenus were a hassle to add and a pain to maintain. When I realized that I wanted a plugin that allowed me to create a submenu once and include it as a menu item in a separate menu, I was surprised to find that no such plugin existed.
Navception became a necessity when working on that same client’s main menu. This menu became so large that I received the following warning: “You are approaching the post variable limit imposed by your server configuration. Exceeding this limit may automatically delete menu items when you save.” It turns out that every Nav Menu Item in the WordPress Admin area has roughly 8 inputs associated with it. One of the aforementioned submenus contained 7 menu items, or 56 inputs. Using Navception, I created that submenu as a stand-alone WordPress menu, then included it as 1 menu item in the client’s main menu. This reduced the inputs generated by that submenu from 56 to 8. Since that submenu was included 4 times, I not only avoided the Post Variable Limit, but I also made the menu easier to manage.
Dangers of Navception
When embedding menus in other menus, you must take care not to include the same menu in itself. When done directly or indirectly, this can cause your website to go into an infinite loop (aka Limbo) when attempting to display the menu. I added some safeguards to keep you from accidentally causing this to happen, though I’m only 90% confident that I covered all scenarios. If you ever put your website into Limbo, you only need to remove the menu you embedded, then please make a post in the support forum telling me what you did so I can cover that case as well.

各版本下載點

  • 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
  • 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Navception」來進行安裝。

(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。


1.0.0 | 2.0.0 | trunk |

延伸相關外掛(你可能也想知道)

  • JC Submenu 》JC子選單外掛允許你自動填入自定義的文章類型、分類或子頁面到導覽選單中。此外掛容易使用,並被設計成為一個輕量化的選單擴充套件。, 透過我們的進階子選單...。
  • Gecka Submenu 》需要 PHP 5 或以上版本,請確認您的 PHP 版本以免標記外掛為失效。, Submenu 使 WordPress 3.x 導覽系統更加強大。當您的網站有許多頁面而需要自訂選單時,每...。
  • Category Posts in Custom Menu 》此外掛可讓你列出屬於分類法(類別、標籤等)的文章和頁面,並自動替換為文章和頁面本身,並且也支援自訂分類法和自訂文章類型!相容PHP 7.0。, 使用方法, 啟...。
  • Auto Submenu 》WordPress 的預設選單系統只允許您「自動添加新的一級頁面」,對於新的子頁面沒有提供相同的功能。Auto Submenu 解決了這個問題。, 啟用後,每當您發佈新的子...。
  • My Bootstrap Menu 》My Bootstrap Menu 是一個完全可自訂的外掛,可以將 Bootstrap 的樣式套用到任何 WordPress 導覽選單上。Bootstrap 提供了可回應式的選單,適用於手機、平板...。
  • DM Pojo Mobile Menu 》, 此外掛程式是為了修復 Pojo 模板的移動裝置選單,讓子選單以行動裝置常見的方式適配。, 我們還在行動裝置選單按鈕上加入了動畫效果,讓它看起來更酷。, 包...。
  • Codepress Menu 》使用原生的wp_nav_menu() 功能。 添加參數到 wp_nav_menu() 以啟用功能。 , 同時,在 WordPress 管理員中附帶了一鍵刪除菜單項目的功能。使用屏幕選項開啟或...。
  • Menu Obfuscator 》這個外掛可幫助您在WordPress管理員中,針對特定的使用者隱藏選單或子選單。您可以隱藏特定使用者的個別選項,以便獲得更簡潔的介面。 。
  • Enhanced Custom Menu 》Enhanced Custom Menu是一款可提升WordPress 3.0中「自動加入新頂層頁面」功能的外掛,它可以自動地將子頁面加入到自訂選單的階層中。這款外掛可讓WordPress ...。
  • Auto Generate Submenus 》此外掛會在選單編輯器 (管理員後台) 中為導覽選單項目增加欄位,並允許在前端自動生成子選單。, , 舉例來說,您可以要求在子選單中顯示某個分類的最後五個項...。
  • RVSubMenu 》這款外掛原本用於取得當前菜單項目所指的子菜單,並且以菜單的形式顯示,例如在左側顯示一個子菜單。, 假設您有一個很大的主菜單,而且有很多子菜單,因此為...。
  • Tomi Menu 》當頁面被創建/編輯時,若啟用,此外掛會自動將子頁面加入正確菜單中,並在需要移除時將頁面從原菜單中移除。, 使用說明, 只需在所選菜單中勾選“自動將新的頂...。
  • Clean Menu 》在儀表板上隱藏菜單。
  • Automatic Submenu for Categories & Pages 》是否曾經想要自動將分類和頁面的子項目添加到您的菜單中?我確定我也是,但是發現沒有什麼簡單易用且不會干擾主題或其他外掛的東西。, 現在,請耐心等待,因...。

文章
Filter
Apply Filters
Mastodon