
內容簡介
WP Cards使用WordPress小部件和全頁寬側邊欄,添加了將可拖放的小部件卡片添加到網站主頁的功能。主題開發人員只需要在他們的佈景主題中添加包含的“home.php”文件,或在現有的主頁文件中添加一個對動態側邊欄的呼叫,他們的主題主頁就會自動支持全頁寬卡片。
網站管理員可以在不需要任何編程技能或依賴程序員進行更改的情況下立即重新配置其站點的主頁。管理員只需登錄WordPress管理區域,進入部件管理頁面,然後將卡片拖放到主頁的卡片側邊欄中。添加新頁面元素,將頁面元素上下移動或刪除頁面元素只需要幾秒鐘,網站主頁就會自動更新。
WP Cards還支持添加“Jumbotron”卡片區域,可以配置Jumbotron卡片只出現在網站的某些類型的頁面上。例如,“搜索Jumbotron”卡片可以配置為僅在網站的搜索和404頁面上顯示。或者,“註冊Jumbotron”可以配置為僅出現在網站的主頁上。
WP Cards是為現有的WordPress佈景主題添加卡片概念的框架,旨在由其他開發人員進行完全擴展。WP Cards附帶了許多已開發好的卡片,可以通過將新卡片添加到WP Cards的“cards”目錄中,或將“cards”文件夾添加到主題或子主題的根目錄中來輕鬆擴展。WP Cards會自動從這些“cards”目錄加載所有小部件(使用預定義的命名慣例)到WordPress管理區域的小部件部分。
WP Cards的預設卡片是使用Bootstrap 3構建的,並依賴於Bootstrap 3 CSS和JavaScript文件。
WP Cards自動向WordPress小部件管理頁面添加了兩個側邊欄區域,這些區域名稱為“卡片暫存區域”和“主頁卡片”。 “卡片暫存區域”只是用於在添加到實時頁面之前構建卡片的沙箱小部件區域。該插件還允許從插件選項頁面激活三個其他卡片區域,包括“Jumbotron卡片”和“Header / Footer卡片”。
該插件包括一個“WP卡片模板”(wp-cards-template.php),可以添加到任何頁面中,以向網站添加卡片佈局頁面。管理員只需創建新的頁面並將頁面模板設置為“WP Cards Template”,同名的部件區域就會自動在小部件管理區域中生成。管理員只需將小部件拖放到新建的小部件區域中,它們就會加載到頁面中。
將卡片存儲在由WP Cards插件生成的小部件區域中,使網站管理員可以隨著時間更改WordPress佈景主題,網站的現有卡片仍可用於在新主題中使用和維護。
外掛標籤
開發者團隊
原文外掛簡介
WP Cards uses WordPress widgets and full-page width sidebars to add the ability to drag-and-drop widgetized cards to a website’s homepage. A theme developer just needs to add the included “home.php” file in their theme, or add a call to a dynamic sidebar to their existing home file, and their theme’s homepage will automatically support full-page width cards.
A website admin can reconfigure their site’s homepage on-the-fly without any programming skills or the need to depend on a programmer to make the changes. The admin just needs to log into the WordPress admin area, click-through to the Widgets admin page and drag-and-drop cards into the homepage’s card sidebar. Adding new page elements, moving page elements up and down, or removing page elements can happen in just a matter of seconds, and the website’s homepage is automatically updated.
WP Cards also supports adding a “Jumbotron” card area, Jumbotron cards can be configured to only show up on certain types of pages on the website. For example, a “Search Jumbotron” card can be configured to show up on just the website’s search and 404 pages. Or a “Registration Jumbotron” can be configured to appear just on the website’s homepage.
WP Cards is a framework for adding the card concept to an existing WordPress theme, and is designed to be full extended by other developers. WP Cards comes with a number of already developed cards and can be easily extended by adding new cards to the WP Cards’ “cards” directory, or by adding a “cards” folder to a theme or child theme’s root directory. WP Cards automatically loads all widgets (which use a pre-defined naming convention) from these “cards” directories into the widgets section of the WordPress admin area.
WP Cards’ default cards were built using Bootstrap 3 and are dependent on the Bootstrap 3 CSS and JavaScript files.
WP Cards automatically adds two sidebar areas to the WordPress widgets admin page, these are named “Card Staging Area” and “Home Page Cards”. The “Card Staging Area” is just a sandbox widget area for building out cards before adding them to a live page. The plugin also allows for three additional card areas to be activated from the plugin options page, these include the “Jumbotron Cards” and the “Header/Footer Cards”.
The plugin includes a “WP Cards Template” (wp-cards-template.php) that can be added to any page in order to add a card layout page to a website. An admin would just have to create a new page and set the page template to “WP Cards Template” and a widget area by the same name as the new page is automatically generated in the widget admin area. The admin just needs to drag widgets into the newly created widget area and they will load into the page.
Having cards stored in widget areas generated by the WP Cards plugin enables a website admin to switch out WordPress themes over time, the website’s existing cards will still be available to be used and maintained within a new theme.
