[wordpress插件] Arbitrary Shortcodes任意简码

wordpress 插件 文章 2020-02-20 19:00 493 0 全屏看文

AI助手支持GPT4.0

评分
0
描述

Replaces Shortcodes with Homepage Custom Fields.

用首页自定义字段替换简码。

This plugin allows you to write your page content like this:

此插件可让您像这样编写页面内容:

“Contact our company, [company_name], by email at: [email].”

“通过电子邮件联系我们公司,[company_name]:[email]。”

Text with these shortcodes can be defined on any number of pages throughout your site.

带有这些短代码的文本可以在您网站的任意数量的页面上进行定义。

The values of all of the shortcodes are controlled in a single location: the Custom Fields of your blog’s home page.

所有简码的值都在一个位置控制:博客首页的“自定义字段”。

For the above example, there would be Custom Fields on the home page called “company_name” and “email” with the values, respectively, of “Example Company Name” and “info@example.com”.

对于上面的示例,在主页上将有名为“ company_name”和“ email”的“自定义字段”,其值分别为“ Example Company Name”和“ info@example.com”。

This plugin requires that you have WordPress set to show a static Page on the home page under Settings->Reading and “Front page”.

此插件要求您已设置WordPress,以便在首页的“设置”->“阅读”和“首页”下显示静态页面。

So then, for all the custom fields entered on the home page, this plugin looks for shortcodes (in all pages) and replaces each of their values, upon output, with the relevant custom field value.

然后,对于在主页上输入的所有自定义字段,此插件将查找短代码(在所有页面中),并在输出时将其每个值替换为相关的自定义字段值。

This is useful for if you want to fill many pages with text that includes an arbitrary number of shortcodes or template text and have all the values can be replaced in one place.

如果要用包含任意数量的短代码或模板文本的文本填充很多页面,并且所有值都可以在一个位置替换,则此功能非常有用。

-By Phil Freo

-通过Phil Freo

安装步骤

This plugin requires that you have WordPress set to show a static Page on the home page under Settings->Reading and “Front page”.

此插件要求您已设置WordPress,以便在首页的“设置”->“阅读”和“首页”下显示静态页面。

    1. Upload the arbitrary-shortcodes/ folder to the /wp-content/plugins/ directory
    2. arbitrary-shortcodes / 文件夹上载到 / wp-content / plugins / 目录

    3. Activate the plugin through the ‘Plugins’ menu in WordPress
    4. 通过WordPress中的“插件”菜单激活插件

    5. Fill your content on any page(s) on your site with the desired arbitrary shortcodes
    6. 使用所需的任意短代码填充您网站上任何页面上的内容

    7. For each shortcode you would like to define, create a custom field (and value) on the page that is shown as the “home page” for the site.
    8. 对于您要定义的每个简码,在显示为网站“主页”的页面上创建一个自定义字段(和值)。

下载地址
https://downloads.wordpress.org/plugin/arbitrary-shortcodes.zip
-EOF-

AI助手支持GPT4.0