
內容簡介
Inserter 允許您從儀表板創建自定義模板,並在您的頁面中插入它們,取代您選擇的 CSS 選擇器。
您可以使用 WordPress 模板插值的underscore.js,並在您的模板中包含基於 JS 的邏輯。
您可以使用 REST API 公開數據,使用全局$post對象,或提供自己格式化為 JSON 的數據。
要查看可用數據,您可以在模板中添加此行,然後在您的網站加載時檢查控制台:
<# console.log( data ); #>
您可以在 https://aristath.github.io/wordpress/introducing-wordpress-inserter-plugin上閱讀有關如何使用插件的更多信息。
外掛標籤
開發者團隊
原文外掛簡介
Inserter allows you to create custom templates from your dashboard and insert the in your pages, replacing a CSS selector of your choosing.
You can use the WordPress Templates Interpolation for underscore.js and include JS-based logic in your templates.
You can expose data using the REST API, using the global $post object, or provide your own JSON-formatted data.
To see the available data, you can add this line in your template and then check the console when your site loads:
<# console.log( data ); #>
You can read more about how to use the plugin on https://aristath.github.io/wordpress/introducing-wordpress-inserter-plugin.
