前言介紹
- 這款 WordPress 外掛「GET Custom Content」是 2013-11-18 上架。
- 目前有 10 個安裝啟用數。
- 上一次更新是 2015-01-11,距離現在已有 3766 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
- 外掛最低要求 WordPress 3.0 以上版本才可以安裝。
- 尚未有人給過這款外掛評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
bgentry |
外掛標籤
urls | custom content | query variables |
內容簡介
E 這個外掛讓你可以建立自訂內容,根據 URL 中的查詢變數顯示在 WordPress 文章中。例如,在你的 URL 中加上「?customer=yes」,會讓側邊欄顯示「我們愛我們的顧客!」,而「?customer=notyet」則會讓側邊欄顯示「今天成為我們的客戶!」。
此外,外掛包括一個短碼以將自訂內容插入到頁面或文章中,還有一個小工具可以將自訂內容添加到側邊欄中。
使用方法:
安裝外掛後,在儀表板菜單中會出現「GET Custom Content」。
以下是幾個步驟:
1. 建立變數。在儀表板菜單的「GET Custom Content」下面點擊「Custom Content Variables」,然後輸入你的變數名稱,然後點擊「新增變數」。
2. 建立變數值。在儀表板菜單的「GET Custom Content」下點擊「新增值」,輸入變數值的名稱和內容,然後在編輯畫面的「GET Custom Content Variables」框中選擇它所屬的變數。
如果你想將這個特定的值作為預設值,在編輯畫面上勾選「Make this the Default?」的核取方塊。如果變數未在 URL 中定義(如www.example.com)或定義了變數但值不存在(如www.example.com?variable=nonexistent),預設值將顯示。
要確保不將多個值設置為預設值,如果有多個值被設置為預設,則 WordPress 請求預設時將顯示排在最前面的值。
3. 使用小工具或短碼請求網站加載自訂內容。有兩種方法顯示自訂內容,一種是使用「GET Custom Content小工具」將其放入側邊欄,另一種方法允許您在頁面的內容中使用短碼加載自訂內容,格式為[bg_gcc variable =“variableName”]。
4. 創建 URL。只需在文章或頁面的正常 URL 中添加「?variablename=valuename」,並將此 URL 提供給您希望查看您自訂內容的人。
如果要覆蓋特定變數組合的預設內容,可以使用相同的模式覆蓋變數/值組合,但使用「default」代替值名稱。例如,可以使用「- value-default」來顯示預設內容之外的內容。
若要在網站中插入 URL 的查詢變數值,可以在添加或編輯 GET Custom Content Variables 時,在描述中輸入該特定變數(在本示例中為「username」),在要填入值的位置輸入「VALUE」。例如,你可以輸入:“歡迎您,VALUE!”來顯示「歡迎您,Gretel!」。
原文外掛簡介
This plugin allows you to create custom content that appears in your WordPress posts depending on query variables in the URL. For example, appending \”?customer=yes\” to your URL can make the sidebar display the phrase \”We love our customers!\” while \”?customer=notyet\” can make the sidebar display \”Become our customer today!\”
The plugin includes a shortcode for insterting custom content into a page or post, as well as a widget for adding custom content to sidebars.
How to use:
After installing the plugin, you will find “GET Custom Content” in your dashboard menu.
There are just a few steps:
Create a Variable.
To create a variable, click “Custom Content Variables” under the “GET Custom Content” section of the Dashboard menu. Type a name for your variable, then click ‘add new variable.’
Create values for the variable
Click “New Value” under the “GET Custom Content” section of the Dashboard menu. Type the name of your value in the post title field, and type some content. Then select the variable to which this value belongs in the “GET Custom Content Variables” box on the editor screen.
If you want this particular value to be the default value, and therefore be shown when the variable is not defined in the URL, click the check box in the “Make this the Default?” box on the editor screen. It will appear if the variable is not defined in the URL (such as www.example.com) or when the variable is defined but the value does not exist (such as www.example.com?variable=nonexistent)
It’s up to you to make sure you don’t set up multiple values to be the default. If more than one value is set as the default, then whichever one is first when WordPress asks for the default will be shown as the default.
Use the widget or shortcode to ask the site to load the custom content
There are two ways to display custom content. One is to use the GET Custom Content widget to drop it in the sidebar. The second method allows you to load custom content in a page’s content using the shortcode, format [bg_gcc variable=”variableName”]
Create a URL. Just take a normal URL for your post or page, and add ?variablename=valuename and give this URL to people whom you would like to see your custom content.
Detailed instructions are here: http://bryangentry.us/get-custom-content-wordpress-plugin/
How can I override the default content defined for a particular variable combination?
The default content for the variable is displayed when the variable is not defined in the URL, or it is defined with a value that does not exist.
If you want to override this content in some place, use the same pattern for overriding a variable/value combination (see answer to previous question), but use “default” instead of the value name. Example:
-value-default
I want this shown instead of the default!
-value-default
How can I insert the URL’s query variable value into my site?
Sometimes you may want to use value in the user’s URL to display something on your page. For example, you might want the link example.com/my-page/?username=Gretel to display “Greetings, Gretel!” on the page. To do this, enter a description for the particular variable (in this case, username) back on the screen where you can add or edit GET Custom Content Variables. Include VALUE in the spot where you want the value to be filled in. For example, you could type:
Greetings, VALUE.
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「GET Custom Content」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
延伸相關外掛(你可能也想知道)
Custom Content by Country (by Shield Security) 》來自 Shield 安全插件團隊的Custom Content by Country擴充套件,, 提供您基於用戶所在區域(如有提供)的位置,選擇顯示/隱藏內容的選項。, 透過簡單的Short...。
Simple Custom Content 》Simple Custom Content(SCC)功能讓你在所有 WordPress 文章和 RSS 訂閱中添加自定義內容。此外,SCC 還提供了幾個簡碼,方便你在個別文章、頁面或主題模板...。
Custom Content 》自定義內容外掛(Custom Content plugin)透過 ES 模組(ES Custom Content)擴展 Visual Composer,可以使用簡碼(shortcode)、小工具(widget)和 VC 模組...。
MD Custom content after or before of post 》這個 WordPress 外掛可以在文章的上方、下方或是兩者都加入自訂的內容,同時也支援 HTML 標籤的使用。, 使用方法, , 前往「設定」→「MD Custom content after...。
Simple Custom Content Adder 》Simple Custom Content Adder (SCCA) 就是在標題上說明的那樣 - 它可以在所有的文章和頁面中簡單地新增一些自訂內容。, 也許您想在所有文章上方添加一個促銷...。
WP Geo Based Content 》WP Geo Based Content 外掛是專為讓您能夠在不同的觀眾面前顯示不同的文本、橫幅廣告、超連結等功能而設計。, 例如,您可以將英語橫幅廣告顯示給北美/英國觀...。
Geo IP Library 》Geo IP Library 可以啟用一些簡單但強大的功能,以在 WordPress 上提供地理 IP 國家功能。到目前為止,其主要功能包括:, , 用於插件和主題的靜態 PHP 函數。,...。
Content Molecules 》在網路行銷/出版業中,"內容分子"指的是可以在網站上多處使用的可重複利用內容片段。這些內容通常是孤立的,經常出現在側邊欄和邊緣上。將這個概念應用到 Wor...。
Add custom content after post 》, 在每篇文章後添加自定义內容。它用於添加聲明、通知、作者信息。, , 聲明, 此插件需要高于平均水平的技術知識。, 請注意, 此項目目前尚處於 Beta 版本。。
Content Shortcode Generator 》***WordPress 外掛總結:Content Shortcode Generator***, Content Shortcode Generator 外掛讓您可以使用 Gutenberg 編輯器建立內容,然後透過簡單的短代碼...。
PRyC WP: Add content to comment form 》在留言表單中新增自訂內容。簡單而有效...。
Custom Content Display in WooCommerce Invoicess 》WooCommerce Custom Content for Invoices 外掛可將自訂內容或值顯示於您的發票中。如果您想編輯發票並在發票表格之前或之後添加一些額外的自訂內容,這個外...。
Elementor Templates Maker, Custom Content For Elementor 》Custom Content by (Shortcode & Elementor Extension) 外掛擴充了 Elementor Builder 的 ES 模組 (ES Custom Content Elementor),可使用簡碼或 Element...。