內容簡介
在網路行銷/出版業中,"內容分子"指的是可以在網站上多處使用的可重複利用內容片段。這些內容通常是孤立的,經常出現在側邊欄和邊緣上。將這個概念應用到 WordPress 框架上,您可以創建可嵌入任何簡碼處理的內容。進一步地,可以給簡碼使用添加任意數量的自定義屬性,並將這些值嵌入到結果輸出中。
[m id="slug" audience="Student" product="backpack"]
上述簡碼會轉換以下分子:
問候 {audience}!
今天試試我們的新 {product}!
變成以下內容:
問候 Student!
今天試試我們的新 backpack!
顯然,這是一個荒謬的例子,但無論目的是什麼,彈性都是相同的。當您需要進行更改或更新時,不要逐個重複網站內容。
分子是一種自定義文章類型。啟用插件後,左側的管理選單中會出現一個名為 "Molecules" 的新部分。在那裡,您可以創建和管理可重複使用的內容片段。作為獎勵,我已將文章縮略名添加到列表視圖中,以供參考。如果您在文章或頁面中嵌入一個分子,而該縮略名尚不存在,它將為您創建一個草稿以供稍後填寫。
目前就這些,歡迎提出未來功能的任何建議。
任意區段
外掛標籤
開發者團隊
原文外掛簡介
In the web marketing/publishing industry a content molecule is basically a piece of reusable content that can be placed throughout a website. Typically isolated in nature, they often appear in sidebars and margins. Applying this concept to the WordPress framework, you can create content that can be embedded anywhere shortcodes are processed. Taking the concept a little further, any number of custom attributes can be added to the usage of the shortcode, and those values can be embedded in the resulting output.
[m id=”slug” audience=”Student” product=”backpack”]
Will translate the following molecule:
Greetings {audience}!
Check out our new {product} today!
into this:
Greetings Student!
Check out our new backpack today!
Obviously a ridiculous example, but the flexibility remains the same regardless of the silly intent. Stop repeating content throughout your site only to have to re-edit those pieces in every location when you need to make a correction or update.
Molecules are a custom post type. After the plugin is activated a new section will appear in the left admin menu titled “Molecules.” There you can create and manage reusable pieces of content. As a bonus I have added the post slug to the list view for easy reference. If you embed a molecule in a post or page and the slug does not exist yet, it will create a draft for you to fill in later.
That’s about it for now, any input for future features is welcome.
Arbitrary section
